Brendan Golden
806a4cfd21
Relates to https://gitlab.skynet.ie/compsoc1/skynet/nixos/-/issues/22 test: Remove the account type limiatation
18 lines
861 B
Nix
18 lines
861 B
Nix
{ 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.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;
|
|
message = "When the certificate scheme is not 'acme' (mailserver.certificateScheme != \"acme\"), it is not possible to define mailserver.acmeCertificateName";
|
|
}
|
|
];
|
|
}
|