Files
nix-config/modules/nixos/boot/lanzaboote/default.nix
2025-09-02 21:08:09 -05:00

38 lines
715 B
Nix

{
config,
lib,
namespace,
...
}:
with lib;
let
cfg = config.${namespace}.bootloader.lanzaboote;
inherit (lib.${namespace}) mkOpt;
in
{
options.${namespace}.bootloader.lanzaboote = {
enable = mkEnableOption "enable lanzaboote";
configLimit = mkOpt types.int 10 "Number of boot items to keep";
};
config = mkIf cfg.enable {
boot = {
loader = {
efi = {
canTouchEfiVariables = true;
efiSysMountPoint = "/boot";
};
};
lanzaboote = {
enable = cfg.enable;
pkiBundle = "/etc/secureboot";
settings = {
console-mode = "max";
};
configurationLimit = cfg.configLimit;
};
};
};
}