first usable configuration

This commit is contained in:
Dennis Wuitz
2023-12-24 20:09:35 +01:00
parent 469038e980
commit c6c879ddb4
7 changed files with 94 additions and 35 deletions

39
modules/boot.nix Normal file
View File

@ -0,0 +1,39 @@
{ 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";
};
};
};
}