dotfiles/nixos/boxes/bolty/bolty-boot.nix

45 lines
1 KiB
Nix
Raw Normal View History

2023-04-22 12:30:19 +01:00
{ config, pkgs, ... }: {
2021-05-31 09:15:44 +01:00
boot = {
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
2023-04-22 12:30:19 +01:00
initrd.availableKernelModules =
[ "nvme" "xhci_pci" "ahci" "usbhid" "usb_storage" "sd_mod" "sdhci_acpi" ];
initrd.kernelModules = [ "dm-snapshot" ];
kernelModules = [ "kvm-amd" ];
extraModulePackages = [ ];
2021-05-31 09:15:44 +01:00
loader.systemd-boot.enable = true;
loader.efi.canTouchEfiVariables = false;
supportedFilesystems = [ "zfs" ];
zfs.forceImportRoot = false;
2021-05-31 09:15:44 +01:00
};
services.btrfs.autoScrub.enable = true;
services.zfs.autoScrub.enable = true;
2023-07-29 15:54:56 +01:00
boot.kernelParams = [ "zfs.zfs_arc_max=8589934592" ];
2023-07-29 15:54:56 +01:00
boot.zfs.extraPools = [ "data" ];
2021-05-31 09:15:44 +01:00
2023-07-29 15:54:56 +01:00
fileSystems."/" = {
2022-03-10 12:25:23 +00:00
device = "/dev/disk/by-uuid/28afab71-ff3d-4f1a-b7e4-2129572706dd";
fsType = "btrfs";
};
2021-05-31 09:15:44 +01:00
2022-03-10 12:25:23 +00:00
fileSystems."/boot" = {
device = "/dev/disk/by-uuid/5BFB-9E6B";
fsType = "vfat";
};
2021-10-01 10:06:37 +01:00
2023-04-22 12:30:19 +01:00
swapDevices = [ ];
2021-05-31 09:15:44 +01:00
2022-12-02 19:47:30 +00:00
nix.settings = {
max-jobs = 8;
cores = 0; # auto
};
2021-05-31 09:15:44 +01:00
zramSwap = {
enable = true;
algorithm = "zstd";
2023-04-22 12:30:19 +01:00
memoryPercent = 100;
2021-05-31 09:15:44 +01:00
};
}