mail-server/networking.nix: make use of use lib.optional

This commit is contained in:
Ruben Maher 2017-11-13 20:03:19 +10:30
parent 5047c2982f
commit 7b3e33c49c
1 changed files with 4 additions and 4 deletions

View File

@ -24,10 +24,10 @@ in
networking.firewall = { networking.firewall = {
allowedTCPPorts = [ 25 587 ] allowedTCPPorts = [ 25 587 ]
++ (if enableImap then [ 143 ] else []) ++ lib.optional enableImap 143
++ (if enableImapSsl then [ 993 ] else []) ++ lib.optional enableImapSsl 993
++ (if enablePop3 then [ 110 ] else []) ++ lib.optional enablePop3 110
++ (if enablePop3Ssl then [ 995 ] else []); ++ lib.optional enablePop3Ssl 995;
}; };
}; };
} }