2023-08-15 03:10:15 +02:00
|
|
|
{ config, lib, pkgs, modulesPath, ... }: {
|
|
|
|
imports = [ (modulesPath + "/installer/scan/not-detected.nix") ];
|
2023-06-30 12:34:49 +02:00
|
|
|
|
|
|
|
boot.initrd.availableKernelModules = [ "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
|
|
|
|
boot.initrd.kernelModules = [ ];
|
|
|
|
boot.kernelModules = [ "kvm-intel" ];
|
|
|
|
boot.extraModulePackages = [ ];
|
|
|
|
|
2023-08-15 03:10:15 +02:00
|
|
|
fileSystems."/" = {
|
|
|
|
device = "/dev/disk/by-label/ROOT";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = [ "subvol=@" ];
|
|
|
|
};
|
2023-07-12 13:52:15 +02:00
|
|
|
|
2023-08-15 03:10:15 +02:00
|
|
|
boot.initrd.luks.devices."DISK".device = "/dev/nvme0n1p1";
|
2023-07-12 13:52:15 +02:00
|
|
|
|
2023-08-15 03:10:15 +02:00
|
|
|
fileSystems."/boot" = {
|
|
|
|
device = "/dev/disk/by-label/BOOT";
|
|
|
|
fsType = "vfat";
|
2023-07-12 13:52:15 +02:00
|
|
|
};
|
|
|
|
|
2023-08-15 03:10:15 +02:00
|
|
|
# Enable Swap on LUKS
|
|
|
|
boot.initrd.luks.devices."SWAP" = {
|
|
|
|
device = "/dev/nvme0n1p2";
|
|
|
|
keyFile = "/crypto_keyfile.bin";
|
|
|
|
};
|
2023-07-12 13:52:15 +02:00
|
|
|
|
2023-08-15 03:10:15 +02:00
|
|
|
# Set up the keyfile
|
|
|
|
boot.initrd.secrets."/crypto_keyfile.bin" = null;
|
|
|
|
# Hibernation resume device
|
|
|
|
boot.resumeDevice = "/dev/disk/by-label/SWAP";
|
|
|
|
# Confirm the swap devices
|
|
|
|
swapDevices = [ { device = "/dev/disk/by-label/SWAP"; } ];
|
2023-06-30 12:34:49 +02:00
|
|
|
|
|
|
|
networking.useDHCP = lib.mkDefault true;
|
|
|
|
nixpkgs.hostPlatform = lib.mkDefault "x86_64-linux";
|
2023-08-19 02:17:19 +02:00
|
|
|
powerManagement.cpuFreqGovernor = lib.mkDefault "performance";
|
2023-06-30 12:34:49 +02:00
|
|
|
hardware.cpu.intel.updateMicrocode = lib.mkDefault config.hardware.enableRedistributableFirmware;
|
|
|
|
}
|