feat: add assertion to ensure correctness of options
This commit is contained in:
parent
c978882918
commit
bb8f338c68
|
@ -42,4 +42,11 @@ args@{ config, lib, ... }:
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
|
config.assertions = lib.mkIf config.aether.https [
|
||||||
|
{
|
||||||
|
assertion = !(builtins.isNull config.aether.acmeEmail);
|
||||||
|
message = "HTTPS support requires providing a contact email";
|
||||||
|
}
|
||||||
|
];
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@
|
||||||
};
|
};
|
||||||
|
|
||||||
acmeEmail = lib.mkOption {
|
acmeEmail = lib.mkOption {
|
||||||
type = lib.types.str;
|
type = lib.types.nullOr lib.types.str;
|
||||||
default = "";
|
default = null;
|
||||||
description = "Email address for ACME.";
|
description = "Email address for ACME.";
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue