diff options
author | Jörg Thalheim <Mic92@users.noreply.github.com> | 2021-01-15 08:37:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-01-15 08:37:22 +0000 |
commit | 9c4a18591f0b5005b74aee249056c5a8ea6502f4 (patch) | |
tree | 012378f684247f2392184e1b1389d45547a41eea /nixos/modules | |
parent | 9e3a6eaec14dd682197cf38a9afacb88d76e3a87 (diff) | |
parent | 7a62c0bc957116b7fa61d469cf008038d34d5e2e (diff) |
Merge pull request #109096 from ju1m/tor
nixos/tor: fix openFirewall when ORPort isInt
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/services/security/tor.nix | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/nixos/modules/services/security/tor.nix b/nixos/modules/services/security/tor.nix index 390dcfccfec3..54c2c2dea23a 100644 --- a/nixos/modules/services/security/tor.nix +++ b/nixos/modules/services/security/tor.nix @@ -909,8 +909,11 @@ in networking.firewall = mkIf cfg.openFirewall { allowedTCPPorts = - concatMap (o: optional (isInt o && o > 0 || o ? "port" && isInt o.port && o.port > 0) o.port) - (flatten [ + concatMap (o: + if isInt o && o > 0 then [o] + else if o ? "port" && isInt o.port && o.port > 0 then [o.port] + else [] + ) (flatten [ cfg.settings.ORPort cfg.settings.DirPort ]); |