refactor(glittershark/chupacabra): Move boot config into a block

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>
This commit is contained in:
Vincent Ambo 2020-08-17 02:09:01 +01:00 committed by tazjin
parent 4d113ae9f9
commit d29bb5cbf8

View file

@ -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