diff options
author | Vincent Ambo <mail@tazj.in> | 2020-08-17T01·09+0100 |
---|---|---|
committer | tazjin <mail@tazj.in> | 2020-08-17T09·54+0000 |
commit | d29bb5cbf842b92c4018e83d9e238886f9f4a930 (patch) | |
tree | 3d1db05bf758914b0b6ca7cff5f0770dc259a184 /users/glittershark/system | |
parent | 4d113ae9f91acd167e4ab739025911ead66b7f2a (diff) |
refactor(glittershark/chupacabra): Move boot config into a block r/1660
This is kind of difficult to read otherwise because the boot configuration is scattered throughout the file. Change-Id: I8977b1bd2b9162c898c96aa249c40749b3d46180 Reviewed-on: https://cl.tvl.fyi/c/depot/+/1762 Tested-by: BuildkiteCI Reviewed-by: glittershark <grfn@gws.fyi>
Diffstat (limited to 'users/glittershark/system')
-rw-r--r-- | users/glittershark/system/system/machines/chupacabra.nix | 29 |
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 |