2024-03-06 15:36:02 +01:00
|
|
|
{ options, config, lib, pkgs, ... }:
|
|
|
|
|
|
|
|
with lib;
|
2024-03-20 08:58:05 +01:00
|
|
|
with lib.metacfg;
|
|
|
|
let cfg = config.metacfg.secureboot;
|
2024-03-06 15:36:02 +01:00
|
|
|
in
|
|
|
|
{
|
2024-03-20 08:58:05 +01:00
|
|
|
options.metacfg.secureboot = with types; {
|
2024-03-06 15:36:02 +01:00
|
|
|
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;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|