nix-config/hosts/loki/hardware-configuration.nix

37 lines
770 B
Nix
Raw Normal View History

2023-09-19 17:05:08 +00:00
{
imports = [
2023-09-20 13:09:16 +00:00
../common/optional/ephemeral-btrfs.nix
../common/optional/encrypted-root.nix
];
boot = {
initrd = {
2023-09-19 17:05:08 +00:00
availableKernelModules = [ "ahci" "xhci_pci" "nvme" "thunderbolt" "usb_storage" "sd_mod" "rtsx_pci_sdmmc" ];
2023-09-20 13:09:16 +00:00
kernelModules = [ "kvm-amd" ];
};
loader = {
systemd-boot = {
enable = true;
consoleMode = "max";
};
efi.canTouchEfiVariables = true;
};
};
2023-09-20 13:09:16 +00:00
fileSystems = {
"/boot" = {
device = "/dev/disk/by-label/ESP";
fsType = "vfat";
};
2023-09-20 13:09:16 +00:00
};
swapDevices = [{
2023-09-20 13:09:16 +00:00
device = "/swap/swapfile";
size = 8196;
}];
nixpkgs.hostPlatform.system = "x86_64-linux";
2023-09-20 13:09:16 +00:00
hardware.cpu.amd.updateMicrocode = true;
powerManagement.cpuFreqGovernor = "powersave";
}