2023-12-23 02:33:26 -05:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
modulesPath,
|
2024-02-11 12:31:29 -05:00
|
|
|
pkgs,
|
2023-12-23 02:33:26 -05:00
|
|
|
...
|
|
|
|
}: {
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
|
|
|
|
|
|
|
boot = {
|
2024-02-17 14:52:43 -05:00
|
|
|
kernelPackages = pkgs.linuxPackages_zen;
|
2023-12-23 02:33:26 -05:00
|
|
|
|
|
|
|
kernelModules = ["kvm-amd"];
|
2024-02-17 14:52:43 -05:00
|
|
|
|
|
|
|
# Zenpower for ryzen cpu monitoring
|
|
|
|
extraModulePackages = with config.boot.kernelPackages; [zenpower];
|
|
|
|
blacklistedKernelModules = ["k10temp"];
|
|
|
|
|
2023-12-23 02:33:26 -05:00
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"nvme"
|
|
|
|
"xhci_pci"
|
|
|
|
"ahci"
|
|
|
|
"usb_storage"
|
|
|
|
"usbhid"
|
|
|
|
"sd_mod"
|
|
|
|
];
|
2024-02-11 12:31:29 -05:00
|
|
|
|
|
|
|
loader = {
|
2024-02-17 14:52:43 -05:00
|
|
|
efi.canTouchEfiVariables = true;
|
2024-02-11 12:31:29 -05:00
|
|
|
timeout = 2;
|
|
|
|
|
2024-02-17 14:52:43 -05:00
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
consoleMode = "max";
|
|
|
|
configurationLimit = 30;
|
|
|
|
};
|
2024-02-11 12:31:29 -05:00
|
|
|
};
|
2024-05-17 16:13:27 -04:00
|
|
|
|
|
|
|
# Support building binaries for arm64
|
|
|
|
binfmt.emulatedSystems = ["aarch64-linux"];
|
2023-12-23 02:33:26 -05:00
|
|
|
};
|
|
|
|
|
|
|
|
fileSystems = {
|
|
|
|
"/" = {
|
|
|
|
device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
fsType = "btrfs";
|
|
|
|
};
|
|
|
|
|
2024-08-25 02:00:32 -04:00
|
|
|
# sudo btrfs subvolume create /@swap
|
|
|
|
"/swap" = {
|
|
|
|
device = "/dev/disk/by-label/NIXROOT";
|
|
|
|
fsType = "btrfs";
|
|
|
|
options = ["subvol=@swap"];
|
|
|
|
};
|
|
|
|
|
2023-12-23 02:33:26 -05:00
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/NIXBOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2024-08-18 23:14:30 -04:00
|
|
|
swapDevices = [
|
|
|
|
{
|
2024-08-25 02:00:32 -04:00
|
|
|
device = "/swap/swapfile";
|
2024-08-18 23:14:30 -04:00
|
|
|
size = 16 * 1024;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
2023-12-23 02:33:26 -05:00
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
|
|
hardware.cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
|
|
|
}
|