assertions
This commit is contained in:
@@ -22,6 +22,17 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = !cfg.yubikeyEncryption || config.${namespace}.hardware.disko.enableLuks;
|
||||
message = "mjallen.boot.common.yubikeyEncryption requires mjallen.hardware.disko.enableLuks = true.";
|
||||
}
|
||||
{
|
||||
assertion = !cfg.yubikeyEncryption || config.${namespace}.hardware.disko.enable;
|
||||
message = "mjallen.boot.common.yubikeyEncryption requires mjallen.hardware.disko.enable = true (disko-managed disk layout).";
|
||||
}
|
||||
];
|
||||
|
||||
boot = {
|
||||
|
||||
kernelModules = [ "kvm" ];
|
||||
@@ -78,7 +89,7 @@ in
|
||||
};
|
||||
slot = 2;
|
||||
twoFactor = false;
|
||||
gracePeriod = yubikeyGracePeriod;
|
||||
gracePeriod = cfg.yubikeyGracePeriod;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
@@ -17,6 +17,13 @@ in
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.configLimit > 0;
|
||||
message = "mjallen.bootloader.lanzaboote.configLimit must be a positive integer (got ${toString cfg.configLimit}).";
|
||||
}
|
||||
];
|
||||
|
||||
boot = {
|
||||
loader = {
|
||||
efi = {
|
||||
|
||||
Reference in New Issue
Block a user