mail-server/networking.nix: make use of use lib.optional
This commit is contained in:
parent
5047c2982f
commit
7b3e33c49c
|
@ -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;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue