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 = {
allowedTCPPorts = [ 25 587 ]
++ (if enableImap then [ 143 ] else [])
++ (if enableImapSsl then [ 993 ] else [])
++ (if enablePop3 then [ 110 ] else [])
++ (if enablePop3Ssl then [ 995 ] else []);
++ lib.optional enableImap 143
++ lib.optional enableImapSsl 993
++ lib.optional enablePop3 110
++ lib.optional enablePop3Ssl 995;
};
};
}