dotfiles/nixos/boxes/bolty/bolty-boot.nix
Cyryl Płotnicki 635f5902aa
Some checks are pending
use nix / build (push) Waiting to run
cleanup, make checks pass
2024-04-27 11:33:38 +01:00

51 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;
zfs = {
autoScrub.enable = true;
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;
};
}