39 lines
871 B
Nix
Raw Normal View History

2023-12-24 20:09:35 +01:00
{ config, lib, libS, ... }:
let
cfg = config.boot;
in
{
options = {
boot = {
default = libS.mkOpinionatedOption "enable the boot builder";
};
};
config.boot = lib.mkIf cfg.default {
supportedFilesystems = [ "zfs" ];
tmp.useTmpfs = true;
kernelPackages = config.boot.zfs.package.latestCompatibleLinuxPackages;
kernelParams = [ "kvm-amd" "nordrand" ];
zfs = {
enableUnstable = true;
devNodes = "/dev/disk/by-id/";
forceImportRoot = true;
};
loader = {
efi = {
canTouchEfiVariables = false;
};
generationsDir.copyKernels = true;
grub = {
enable = true;
copyKernels = true;
zfsSupport = true;
efiSupport = true;
efiInstallAsRemovable = true;
fsIdentifier = "uuid";
device = "nodev";
};
};
};
}