mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-26 15:06:14 +01:00
46a0829aa8
Allow the user to specify the name of the ACME configuration that the mailserver should use. This allows users that request certificates that aren't the FQDN of the mailserver, for example a wildcard certificate.
22 lines
1 KiB
Nix
22 lines
1 KiB
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.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.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";
|
|
}
|
|
];
|
|
}
|