about summary refs log tree commit diff
path: root/nixos/modules/services/networking/ssh
diff options
context:
space:
mode:
authorFelix Buehler <account@buehler.rocks>2023-06-25 11:47:43 +0200
committerAnderson Torres <torres.anderson.85@protonmail.com>2023-06-25 09:11:40 -0300
commit933a41a73fe2174b90cabb7d671ee2cc5658701a (patch)
tree1f8228d1369ab51c644a47ab269fb9c638553752 /nixos/modules/services/networking/ssh
parent175e9d1f00c41b49606e4eacbc1bfe396641e90f (diff)
downloadnixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar.gz
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar.bz2
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar.lz
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar.xz
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.tar.zst
nixlib-933a41a73fe2174b90cabb7d671ee2cc5658701a.zip
treewide: use optional instead of 'then []'
Diffstat (limited to 'nixos/modules/services/networking/ssh')
-rw-r--r--nixos/modules/services/networking/ssh/sshd.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/nixos/modules/services/networking/ssh/sshd.nix b/nixos/modules/services/networking/ssh/sshd.nix
index 59980a4cef9c..fb9774bafdeb 100644
--- a/nixos/modules/services/networking/ssh/sshd.nix
+++ b/nixos/modules/services/networking/ssh/sshd.nix
@@ -528,7 +528,7 @@ in
 
       };
 
-    networking.firewall.allowedTCPPorts = if cfg.openFirewall then cfg.ports else [];
+    networking.firewall.allowedTCPPorts = optionals cfg.openFirewall cfg.ports;
 
     security.pam.services.sshd =
       { startSession = true;