Files
nix-config/hosts/nas/boot.nix
2024-07-24 21:43:55 -05:00

53 lines
809 B
Nix

{
inputs,
outputs,
config,
lib,
pkgs,
...
}:
let
configLimit = 5;
kernel = pkgs.linuxPackages_latest;
in
{
# Configure bootloader with lanzaboot and secureboot
boot = {
loader = {
systemd-boot = {
enable = true;
configurationLimit = configLimit;
};
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
# Override kernel to latest
kernelPackages = kernel;
kernelParams = [
"nohibernate"
"amd_pstate=active"
];
consoleLogLevel = 3;
bootspec.enable = true;
initrd = {
kernelModules = [
"tpm"
"tpm_tis"
"tpm_crb"
"tpm_infineon"
];
systemd = {
enable = true;
enableTpm2 = true;
};
};
};
}