mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-12 05:16:25 +03:00
nixos/tor: fix openFirewall when ORPort isInt
This commit is contained in:
parent
5cbe85dbd8
commit
7a62c0bc95
1 changed files with 5 additions and 2 deletions
|
@ -909,8 +909,11 @@ in
|
||||||
|
|
||||||
networking.firewall = mkIf cfg.openFirewall {
|
networking.firewall = mkIf cfg.openFirewall {
|
||||||
allowedTCPPorts =
|
allowedTCPPorts =
|
||||||
concatMap (o: optional (isInt o && o > 0 || o ? "port" && isInt o.port && o.port > 0) o.port)
|
concatMap (o:
|
||||||
(flatten [
|
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.ORPort
|
||||||
cfg.settings.DirPort
|
cfg.settings.DirPort
|
||||||
]);
|
]);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue