2024-08-18 20:59:01 -04:00
|
|
|
{
|
|
|
|
config,
|
|
|
|
modulesPath,
|
|
|
|
...
|
|
|
|
}: {
|
|
|
|
nixpkgs.hostPlatform = "x86_64-linux";
|
|
|
|
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
|
|
|
|
|
|
|
|
boot = {
|
|
|
|
loader = {
|
|
|
|
efi.canTouchEfiVariables = true;
|
|
|
|
timeout = 2;
|
|
|
|
|
|
|
|
systemd-boot = {
|
|
|
|
enable = true;
|
|
|
|
consoleMode = "max";
|
|
|
|
configurationLimit = 30;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
initrd.availableKernelModules = [
|
|
|
|
"xhci_pci"
|
|
|
|
"ahci"
|
|
|
|
"nvme"
|
|
|
|
"usbhid"
|
|
|
|
"usb_storage"
|
|
|
|
"sd_mod"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
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"];
|
|
|
|
};
|
|
|
|
|
2024-08-18 20:59:01 -04:00
|
|
|
"/boot" = {
|
|
|
|
device = "/dev/disk/by-label/NIXBOOT";
|
|
|
|
fsType = "vfat";
|
|
|
|
options = ["fmask=0022" "dmask=0022"];
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
swapDevices = [
|
|
|
|
{
|
2024-08-25 02:00:32 -04:00
|
|
|
device = "/swap/swapfile";
|
2024-08-18 20:59:01 -04:00
|
|
|
size = 16 * 1024;
|
|
|
|
}
|
|
|
|
];
|
|
|
|
|
|
|
|
zramSwap.enable = true;
|
|
|
|
|
|
|
|
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
|
|
|
|
}
|