nixos-configs/devices/nos/hardware-configuration.nix

65 lines
1 KiB
Nix
Raw Normal View History

2024-03-02 02:59:40 -05:00
{
config,
modulesPath,
self,
2024-03-02 02:59:40 -05:00
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [
(modulesPath + "/installer/scan/not-detected.nix")
self.nixosModules.nvidia
];
nvidia = {
enable = true;
enableCUDA = true;
};
2024-03-02 02:59:40 -05:00
boot = {
kernelModules = ["kvm-intel"];
2024-03-02 02:59:40 -05:00
initrd.availableKernelModules = [
"xhci_pci"
"ahci"
"nvme"
"usbhid"
"usb_storage"
"sd_mod"
];
loader = {
efi.canTouchEfiVariables = true;
timeout = 2;
systemd-boot = {
enable = true;
consoleMode = "max";
configurationLimit = 30;
};
};
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/var/lib/swapfile";
size = 16 * 1024;
}
];
2024-03-02 02:59:40 -05:00
zramSwap.enable = true;
hardware.cpu.intel.updateMicrocode = config.hardware.enableRedistributableFirmware;
}