mirror of
https://gitlab.com/simple-nixos-mailserver/nixos-mailserver.git
synced 2024-12-28 16:06:12 +01:00
put the warning where it actually works ^^
This commit is contained in:
parent
de73b65b7d
commit
bc1a1b8993
1 changed files with 8 additions and 2 deletions
10
default.nix
10
default.nix
|
@ -117,7 +117,6 @@ in
|
||||||
|
|
||||||
extraVirtualAliases = mkOption {
|
extraVirtualAliases = mkOption {
|
||||||
type = types.attrsOf (types.enum (builtins.attrNames cfg.loginAccounts));
|
type = types.attrsOf (types.enum (builtins.attrNames cfg.loginAccounts));
|
||||||
warnings = [ "virtualAliases had been derprecated. Use extraVirtualAliases instead or use the `aliases` field of the loginAccount attribute set"];
|
|
||||||
example = {
|
example = {
|
||||||
"info@example.com" = "user1@example.com";
|
"info@example.com" = "user1@example.com";
|
||||||
"postmaster@example.com" = "user1@example.com";
|
"postmaster@example.com" = "user1@example.com";
|
||||||
|
@ -136,7 +135,6 @@ in
|
||||||
|
|
||||||
virtualAliases = mkOption {
|
virtualAliases = mkOption {
|
||||||
type = types.attrsOf (types.enum (builtins.attrNames cfg.loginAccounts));
|
type = types.attrsOf (types.enum (builtins.attrNames cfg.loginAccounts));
|
||||||
warnings = [ "virtualAliases had been derprecated. Use extraVirtualAliases instead or use the `aliases` field of the loginAccount attribute set"];
|
|
||||||
example = {
|
example = {
|
||||||
"info@example.com" = "user1@example.com";
|
"info@example.com" = "user1@example.com";
|
||||||
"postmaster@example.com" = "user1@example.com";
|
"postmaster@example.com" = "user1@example.com";
|
||||||
|
@ -327,4 +325,12 @@ in
|
||||||
./mail-server/rmilter.nix
|
./mail-server/rmilter.nix
|
||||||
./mail-server/nginx.nix
|
./mail-server/nginx.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 [];
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue