assertions
This commit is contained in:
@@ -260,6 +260,20 @@ in
|
||||
];
|
||||
|
||||
config = lib.mkIf cfg.enable {
|
||||
assertions = [
|
||||
{
|
||||
assertion = cfg.bootType != "uboot" || cfg.firmwarePackage != null;
|
||||
message = "mjallen.hardware.raspberry-pi.firmwarePackage must be set when bootType is \"uboot\".";
|
||||
}
|
||||
{
|
||||
assertion = cfg.bootType != "kernel" || cfg.firmwarePackage != null;
|
||||
message = "mjallen.hardware.raspberry-pi.firmwarePackage must be set when bootType is \"kernel\".";
|
||||
}
|
||||
{
|
||||
assertion = cfg.nixosGenerationsDir != "";
|
||||
message = "mjallen.hardware.raspberry-pi.nixosGenerationsDir must be a non-empty path.";
|
||||
}
|
||||
];
|
||||
|
||||
boot = {
|
||||
initrd.availableKernelModules = [
|
||||
|
||||
Reference in New Issue
Block a user