moar options
This commit is contained in:
@@ -15,9 +15,6 @@
|
|||||||
../graphical/openrgb.nix
|
../graphical/openrgb.nix
|
||||||
../graphical/plasma.nix
|
../graphical/plasma.nix
|
||||||
../graphical/shared.nix
|
../graphical/shared.nix
|
||||||
../hardware/firmware.nix
|
|
||||||
../hardware/nvidia.nix
|
|
||||||
../hardware/ssd.nix
|
|
||||||
../kernel.nix # use latest kernel
|
../kernel.nix # use latest kernel
|
||||||
../nix/index.nix
|
../nix/index.nix
|
||||||
../nix/ld.nix
|
../nix/ld.nix
|
||||||
@@ -29,11 +26,16 @@
|
|||||||
];
|
];
|
||||||
|
|
||||||
kop = {
|
kop = {
|
||||||
hardware.wooting.enable = true;
|
|
||||||
tmpfs.enable = true;
|
tmpfs.enable = true;
|
||||||
wireshark.enable = true;
|
wireshark.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
nftables.enable = true;
|
nftables.enable = true;
|
||||||
cli-tools.enable = true;
|
cli-tools.enable = true;
|
||||||
|
hardware = {
|
||||||
|
nvidia.enable = true;
|
||||||
|
firmware.enable = true;
|
||||||
|
ssd.enable = true;
|
||||||
|
wooting.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -5,5 +5,9 @@
|
|||||||
tmpfs.enable = true;
|
tmpfs.enable = true;
|
||||||
wireshark.enable = true;
|
wireshark.enable = true;
|
||||||
virt-manager.enable = true;
|
virt-manager.enable = true;
|
||||||
|
hardware = {
|
||||||
|
firmware.enable = true;
|
||||||
|
ssd.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,12 +30,14 @@
|
|||||||
../motd.nix
|
../motd.nix
|
||||||
../nix/settings.nix
|
../nix/settings.nix
|
||||||
../static-ip.nix
|
../static-ip.nix
|
||||||
### Hardware ###
|
|
||||||
../hardware/ssd.nix
|
|
||||||
];
|
];
|
||||||
|
|
||||||
kop = {
|
kop = {
|
||||||
cli-tools.enable = true;
|
cli-tools.enable = true;
|
||||||
tmpfs.enable = true;
|
tmpfs.enable = true;
|
||||||
|
hardware = {
|
||||||
|
firmware.enable = true;
|
||||||
|
ssd.enable = true;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,16 +1,12 @@
|
|||||||
{ pkgs, config, ...}:
|
{ pkgs, config, ...}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./fh
|
./fh
|
||||||
./graphical
|
./graphical
|
||||||
./hardware
|
./hardware
|
||||||
./nix
|
./misc
|
||||||
./services
|
./nix
|
||||||
./support
|
./services
|
||||||
./tmpfs.nix
|
./support
|
||||||
./wireshark.nix
|
];
|
||||||
./virt-manager.nix
|
|
||||||
./nftables.nix
|
|
||||||
./cli-tools.nix
|
|
||||||
];
|
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,11 @@
|
|||||||
{ pkgs, config, ...}:
|
{ pkgs, config, ...}:
|
||||||
{
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./wooting.nix
|
./firmware.nix
|
||||||
|
./nvidia.nix
|
||||||
|
./scheduler.nix
|
||||||
|
./ssd.nix
|
||||||
|
./vfio.nix
|
||||||
|
./wooting.nix
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
{config, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.kop.hardware.firmware;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.fwupd.enable = true;
|
options.kop.hardware.firmware = {
|
||||||
|
enable = mkEnableOption "Enables firmware";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.fwupd.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,33 +1,43 @@
|
|||||||
{config, pkgs, ...}:
|
{lib, config, pkgs, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.kop.hardware.nvidia;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
# Enable OpenGL
|
options.kop.hardware.nvidia = {
|
||||||
hardware.opengl = {
|
enable = mkEnableOption "Enables nvidia gpus";
|
||||||
enable = true;
|
|
||||||
driSupport = true;
|
|
||||||
driSupport32Bit = true;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
services.xserver.videoDrivers = ["nvidia"];
|
config = mkIf cfg.enable {
|
||||||
hardware.nvidia = {
|
# Enable OpenGL
|
||||||
# Modesetting is required.
|
hardware.opengl = {
|
||||||
modesetting.enable = true;
|
enable = true;
|
||||||
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
driSupport = true;
|
||||||
powerManagement.enable = false;
|
driSupport32Bit = true;
|
||||||
# Fine-grained power management. Turns off GPU when not in use.
|
};
|
||||||
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
|
||||||
powerManagement.finegrained = false;
|
services.xserver.videoDrivers = ["nvidia"];
|
||||||
# Use the NVidia open source kernel module (not to be confused with the
|
hardware.nvidia = {
|
||||||
# independent third-party "nouveau" open source driver).
|
# Modesetting is required.
|
||||||
# Support is limited to the Turing and later architectures. Full list of
|
modesetting.enable = true;
|
||||||
# supported GPUs is at:
|
# Nvidia power management. Experimental, and can cause sleep/suspend to fail.
|
||||||
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
powerManagement.enable = false;
|
||||||
# Only available from driver 515.43.04+
|
# Fine-grained power management. Turns off GPU when not in use.
|
||||||
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
# Experimental and only works on modern Nvidia GPUs (Turing or newer).
|
||||||
open = false;
|
powerManagement.finegrained = false;
|
||||||
# Enable the Nvidia settings menu,
|
# Use the NVidia open source kernel module (not to be confused with the
|
||||||
# accessible via `nvidia-settings`.
|
# independent third-party "nouveau" open source driver).
|
||||||
nvidiaSettings = true;
|
# Support is limited to the Turing and later architectures. Full list of
|
||||||
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
# supported GPUs is at:
|
||||||
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
# https://github.com/NVIDIA/open-gpu-kernel-modules#compatible-gpus
|
||||||
|
# Only available from driver 515.43.04+
|
||||||
|
# Currently alpha-quality/buggy, so false is currently the recommended setting.
|
||||||
|
open = false;
|
||||||
|
# Enable the Nvidia settings menu,
|
||||||
|
# accessible via `nvidia-settings`.
|
||||||
|
nvidiaSettings = true;
|
||||||
|
# Optionally, you may need to select the appropriate driver version for your specific GPU.
|
||||||
|
package = config.boot.kernelPackages.nvidiaPackages.beta;
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,7 +1,19 @@
|
|||||||
|
{config, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.kop.hardware.scheduler;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.system76-scheduler = {
|
options.kop.hardware.scheduler = {
|
||||||
enable = true;
|
enable = mkEnableOption "Enables scheduler";
|
||||||
};
|
};
|
||||||
|
|
||||||
hardware.system76.enableAll = true;
|
config = mkIf cfg.enable {
|
||||||
|
services.system76-scheduler = {
|
||||||
|
enable = true;
|
||||||
|
};
|
||||||
|
|
||||||
|
hardware.system76.enableAll = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,3 +1,15 @@
|
|||||||
|
{config, lib, ...}:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.kop.hardware.ssd;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
services.fstrim.enable = true;
|
options.kop.hardware.ssd = {
|
||||||
|
enable = mkEnableOption "Enables fstrim";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
services.fstrim.enable = true;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,16 @@
|
|||||||
{ pkgs, lib, config, ... }:
|
{ pkgs, lib, config, ... }:
|
||||||
|
with lib;
|
||||||
|
let
|
||||||
|
cfg = config.kop.hardware.vfio;
|
||||||
|
in
|
||||||
{
|
{
|
||||||
config = lib.mkIf config.virtualisation.libvirtd.enable {
|
options.kop.hardware.vfio = {
|
||||||
boot.kernelParams = [ "amd_iommu=on" ];
|
enable = mkEnableOption "Enables vfio";
|
||||||
|
};
|
||||||
|
|
||||||
|
config = mkIf cfg.enable {
|
||||||
|
config = lib.mkIf config.virtualisation.libvirtd.enable {
|
||||||
|
boot.kernelParams = [ "amd_iommu=on" ];
|
||||||
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
10
modules/misc/default.nix
Normal file
10
modules/misc/default.nix
Normal file
@@ -0,0 +1,10 @@
|
|||||||
|
{ pkgs, config, ...}:
|
||||||
|
{
|
||||||
|
imports = [
|
||||||
|
./wireshark.nix
|
||||||
|
./virt-manager.nix
|
||||||
|
./nftables.nix
|
||||||
|
./cli-tools.nix
|
||||||
|
./tmpfs.nix
|
||||||
|
];
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user