remove deprecated virtualAliases

This commit is contained in:
Robin Raymond 2018-02-23 16:48:13 +01:00
parent 0cdd1bd4e1
commit c1c4706519
2 changed files with 1 additions and 28 deletions

View File

@ -152,19 +152,6 @@ in
default = {};
};
virtualAliases = mkOption {
type = types.attrsOf (types.enum (builtins.attrNames cfg.loginAccounts));
example = {
"info@example.com" = "user1@example.com";
"postmaster@example.com" = "user1@example.com";
"abuse@example.com" = "user1@example.com";
};
description = ''
Alias for extraVirtualAliases. Deprecated.
'';
default = {};
};
vmailUID = mkOption {
type = types.int;
default = 5000;
@ -555,12 +542,4 @@ in
./mail-server/nginx.nix
./mail-server/kresd.nix
];
config = lib.mkIf config.mailserver.enable {
warnings = if (config.mailserver.virtualAliases != {}) then [ ''
virtualAliases had been derprecated. Use extraVirtualAliases instead or
use the `aliases` field of the loginAccount attribute set
'']
else [];
};
}

View File

@ -37,13 +37,7 @@ let
cfg.loginAccounts);
# extra_valiases_postfix :: [ String ]
# TODO: Remove virtualAliases when deprecated -> removed
extra_valiases_postfix = (map
(from:
let to = cfg.virtualAliases.${from};
in "${from} ${to}")
(builtins.attrNames cfg.virtualAliases))
++
extra_valiases_postfix =
(map
(from:
let to = cfg.extraVirtualAliases.${from};