48 lines
1.1 KiB
Nix
48 lines
1.1 KiB
Nix
{
|
|
config,
|
|
pkgs,
|
|
...
|
|
}: {
|
|
boot = {
|
|
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
|
|
initrd.availableKernelModules = ["nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi"];
|
|
initrd.kernelModules = ["dm-snapshot"];
|
|
kernelModules = ["kvm-amd"];
|
|
extraModulePackages = [];
|
|
loader.systemd-boot.enable = true;
|
|
loader.efi.canTouchEfiVariables = false;
|
|
supportedFilesystems = ["zfs"];
|
|
zfs.forceImportRoot = false;
|
|
};
|
|
|
|
services.btrfs.autoScrub.enable = true;
|
|
services.zfs.autoScrub.enable = true;
|
|
services.zfs.trim.enable = true;
|
|
|
|
boot.kernelParams = ["zfs.zfs_arc_max=17179869184"];
|
|
|
|
boot.zfs.extraPools = ["data"];
|
|
|
|
fileSystems."/" = {
|
|
device = "/dev/disk/by-uuid/28afab71-ff3d-4f1a-b7e4-2129572706dd";
|
|
fsType = "btrfs";
|
|
};
|
|
|
|
fileSystems."/boot" = {
|
|
device = "/dev/disk/by-uuid/5BFB-9E6B";
|
|
fsType = "vfat";
|
|
};
|
|
|
|
swapDevices = [];
|
|
|
|
nix.settings = {
|
|
max-jobs = 8;
|
|
cores = 0; # auto
|
|
};
|
|
|
|
zramSwap = {
|
|
enable = true;
|
|
algorithm = "zstd";
|
|
memoryPercent = 100;
|
|
};
|
|
}
|