From 0d51a32e4799d081f260eb4db37145f5f4ee7456 Mon Sep 17 00:00:00 2001 From: RoastedCheese Date: Tue, 4 Jun 2024 15:31:28 +0000 Subject: [PATCH] acme: test acmeCertificateName if module is enabled --- mail-server/assertions.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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";