diff --git a/mail-server/assertions.nix b/mail-server/assertions.nix index 2b4b262..0e5b15b 100644 --- a/mail-server/assertions.nix +++ b/mail-server/assertions.nix @@ -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";