Merge pull request #109096 from ju1m/tor

nixos/tor: fix openFirewall when ORPort isInt
This commit is contained in:
Jörg Thalheim 2021-01-15 08:37:22 +00:00 committed by GitHub
commit 9c4a18591f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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
]);