diff options
Diffstat (limited to 'modules/server/tor/default.nix')
-rw-r--r-- | modules/server/tor/default.nix | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/modules/server/tor/default.nix b/modules/server/tor/default.nix index 645684c5dca2..7a0341065d33 100644 --- a/modules/server/tor/default.nix +++ b/modules/server/tor/default.nix @@ -1,7 +1,11 @@ { lib, config, ... }: { - networking.firewall.allowedTCPPorts = [ config.services.tor.relay.port ]; + networking.firewall.allowedTCPPorts = + let + port = config.services.tor.relay.port; + in + lib.optional (lib.isInt port && port > 0) port; services.tor.enable = true; |