From 7b3e33c49cb543d6a21cf846aae7103ef118d2d8 Mon Sep 17 00:00:00 2001 From: Ruben Maher Date: Mon, 13 Nov 2017 20:03:19 +1030 Subject: [PATCH] mail-server/networking.nix: make use of use lib.optional --- mail-server/networking.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; }; }; }