mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-28 03:50:34 +05:00
remove deprecated virtualAliases
This commit is contained in:
parent
0cdd1bd4e1
commit
c1c4706519
21
default.nix
21
default.nix
@ -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 [];
|
||||
};
|
||||
}
|
||||
|
@ -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};
|
||||
|
Loading…
Reference in New Issue
Block a user