assertions: Allow mailserver.forwards with LDAP set up

This commit is contained in:
Elian Doran 2023-12-27 20:27:11 +02:00 committed by Martin Weinelt
parent 776162c162
commit b343c5e8fa
No known key found for this signature in database
GPG key ID: 87C1E9888F856759
2 changed files with 39 additions and 5 deletions

View file

@ -1,4 +1,4 @@
{ config, lib, pkgs, ... }:
{ config, lib, ... }:
{
assertions = lib.optionals config.mailserver.ldap.enable [
{
@ -9,10 +9,6 @@
assertion = config.mailserver.extraVirtualAliases == {};
message = "When the LDAP support is enable (mailserver.ldap.enable = true), it is not possible to define mailserver.extraVirtualAliases";
}
{
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.enable && config.mailserver.certificateScheme != "acme") [
{
assertion = config.mailserver.acmeCertificateName == config.mailserver.fqdn;