about summary refs log tree commit diff
path: root/users/glittershark/system/system/machines/chupacabra.nix
diff options
context:
space:
mode:
Diffstat (limited to 'users/glittershark/system/system/machines/chupacabra.nix')
-rw-r--r--users/glittershark/system/system/machines/chupacabra.nix29
1 files changed, 18 insertions, 11 deletions
diff --git a/users/glittershark/system/system/machines/chupacabra.nix b/users/glittershark/system/system/machines/chupacabra.nix
index cd77e48e337b..5e9fb5795330 100644
--- a/users/glittershark/system/system/machines/chupacabra.nix
+++ b/users/glittershark/system/system/machines/chupacabra.nix
@@ -24,16 +24,31 @@
     thresholdPercentage = 5;
   };
 
-  boot.initrd.luks.devices."cryptswap".device = "/dev/disk/by-uuid/3b6e2fd4-bfe9-4392-a6e0-4f3b3b76e019";
+  boot = {
+    blacklistedKernelModules = [ "nouveau" "intel" ];
+    extraModulePackages = [ ];
+
+    initrd = {
+      availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
+      kernelModules = [ ];
+
+      luks.devices = {
+        "cryptroot".device = "/dev/disk/by-uuid/c2fc7ce7-a45e-48a1-8cde-be966ef601db";
+        "cryptswap".device = "/dev/disk/by-uuid/3b6e2fd4-bfe9-4392-a6e0-4f3b3b76e019";
+      };
+    };
+
+    kernel.sysctl."vm.swappiness" = 1;
+    kernelModules = [ "kvm-intel" ];
+    kernelParams = [ "acpi_rev_override" ];
+  };
 
-  boot.kernelParams = [ "acpi_rev_override" ];
   services.thermald.enable = true;
 
   hardware.cpu.intel.updateMicrocode = true;
 
   # Intel-only graphics
   hardware.nvidiaOptimus.disable = true;
-  boot.blacklistedKernelModules = [ "nouveau" "intel" ];
   services.xserver.videoDrivers = [ "intel" ];
 
   # Nvidia Optimus (hybrid) - currently not working
@@ -55,18 +70,11 @@
 
   # From hardware-configuration.nix
 
-  boot.initrd.availableKernelModules = [ "xhci_pci" "ahci" "nvme" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
-  boot.initrd.kernelModules = [ ];
-  boot.kernelModules = [ "kvm-intel" ];
-  boot.extraModulePackages = [ ];
-
   fileSystems."/" =
     { device = "/dev/mapper/cryptroot";
       fsType = "ext4";
     };
 
-  boot.initrd.luks.devices."cryptroot".device = "/dev/disk/by-uuid/c2fc7ce7-a45e-48a1-8cde-be966ef601db";
-
   fileSystems."/boot" =
     { device = "/dev/disk/by-uuid/3492-9E3A";
       fsType = "vfat";
@@ -83,7 +91,6 @@
 
   # from nixos-hardware TODO sort this around
   services.tlp.enable = true;
-  boot.kernel.sysctl."vm.swappiness" = 1;
   services.fstrim.enable = lib.mkDefault true;
 
   # Intel cpu stuff