nixcfg/modules/nixos/services/secureboot/default.nix

29 lines
442 B
Nix
Raw Permalink Normal View History

{
options,
config,
lib,
pkgs,
...
}:
2024-03-21 15:00:36 +01:00
with lib;
with lib.metacfg;
let
cfg = config.metacfg.secureboot;
2024-03-21 15:00:36 +01:00
in
{
options.metacfg.secureboot = with types; {
enable = mkBoolOpt false "Whether or not to enable secureboot.";
};
config = mkIf cfg.enable {
boot = {
lanzaboote = {
enable = true;
pkiBundle = "/etc/secureboot";
};
loader.systemd-boot.enable = lib.mkForce false;
};
};
}