diff --git a/mail-server/networking.nix b/mail-server/networking.nix index 851a1f0..f9b3336 100644 --- a/mail-server/networking.nix +++ b/mail-server/networking.nix @@ -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; }; }; }