2024-11-19 10:31:29 +01:00
|
|
|
{
|
|
|
|
options,
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2024-03-21 15:00:36 +01:00
|
|
|
|
|
|
|
with lib;
|
|
|
|
with lib.metacfg;
|
2024-11-19 10:31:29 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|