nixos-configs/devices/oksys/hardware-configuration.nix
matt1432 99ea57a669
All checks were successful
Discord / discord commits (push) Has been skipped
feat(oksys): add 16GB swapfile
2024-01-14 19:28:57 -05:00

56 lines
936 B
Nix

{
config,
modulesPath,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
services.logind = {
lidSwitchDocked = "ignore";
lidSwitchExternalPower = "ignore";
};
boot = {
loader = {
timeout = 2;
grub = {
enable = true;
device = "/dev/sda";
};
};
initrd.availableKernelModules = [
"uhci_hcd"
"ehci_pci"
"ahci"
"usbhid"
"usb_storage"
"sd_mod"
];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "ext4";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
}