acme: test acmeCertificateName if module is enabled

This commit is contained in:
RoastedCheese 2024-06-04 15:31:28 +00:00 committed by lewo
parent ed80b589d3
commit 0d51a32e47

View file

@ -13,7 +13,7 @@
assertion = config.mailserver.forwards == {};
message = "When the LDAP support is enable (mailserver.ldap.enable = true), it is not possible to define mailserver.forwards";
}
] ++ lib.optionals (config.mailserver.certificateScheme != "acme") [
] ++ lib.optionals (config.mailserver.enable && config.mailserver.certificateScheme != "acme") [
{
assertion = config.mailserver.acmeCertificateName == config.mailserver.fqdn;
message = "When the certificate scheme is not 'acme' (mailserver.certificateScheme != \"acme\"), it is not possible to define mailserver.acmeCertificateName";