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

73 lines
1.4 KiB
Nix
Raw Normal View History

{
config,
modulesPath,
2024-02-11 12:31:29 -05:00
pkgs,
...
}: {
nixpkgs.hostPlatform = "x86_64-linux";
imports = [(modulesPath + "/installer/scan/not-detected.nix")];
boot = {
kernelPackages = pkgs.linuxPackages_zen;
kernelModules = ["kvm-amd"];
# Zenpower for ryzen cpu monitoring
extraModulePackages = with config.boot.kernelPackages; [zenpower];
blacklistedKernelModules = ["k10temp"];
initrd.availableKernelModules = [
"nvme"
"xhci_pci"
"ahci"
"usb_storage"
"usbhid"
"sd_mod"
];
2024-02-11 12:31:29 -05:00
loader = {
efi.canTouchEfiVariables = true;
2024-02-11 12:31:29 -05:00
timeout = 2;
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"];
};
fileSystems = {
"/" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
};
# sudo btrfs subvolume create /@swap
"/swap" = {
device = "/dev/disk/by-label/NIXROOT";
fsType = "btrfs";
options = ["subvol=@swap"];
};
"/boot" = {
device = "/dev/disk/by-label/NIXBOOT";
fsType = "vfat";
};
};
swapDevices = [
{
device = "/swap/swapfile";
size = 16 * 1024;
}
];
zramSwap.enable = true;
hardware.cpu.amd.updateMicrocode = config.hardware.enableRedistributableFirmware;
}