ldap: set assertions to forbid ldap and loginAccounts simultaneously
This commit is contained in:
parent
7695c856f1
commit
6775502be3
|
@ -1252,6 +1252,7 @@ in
|
|||
};
|
||||
|
||||
imports = [
|
||||
./mail-server/assertions.nix
|
||||
./mail-server/borgbackup.nix
|
||||
./mail-server/debug.nix
|
||||
./mail-server/rsnapshot.nix
|
||||
|
|
|
@ -0,0 +1,17 @@
|
|||
{ config, lib, pkgs, ... }:
|
||||
{
|
||||
assertions = lib.optionals config.mailserver.ldap.enable [
|
||||
{
|
||||
assertion = config.mailserver.loginAccounts == {};
|
||||
message = "When the LDAP support is enable (mailserver.ldap.enable = true), it is not possible to define mailserver.loginAccounts";
|
||||
}
|
||||
{
|
||||
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";
|
||||
}
|
||||
];
|
||||
}
|
Loading…
Reference in New Issue