This commit is contained in:
root 2024-05-27 19:38:28 +02:00
parent b2f80659a7
commit 14cc3fb388
2 changed files with 4 additions and 4 deletions

View file

@ -58,10 +58,10 @@ in
firewall = {
allowedTCPPorts =
map (port: port.num)
(filter (port: port.proto == "tcp") vars.ovenNat.forwardPorts);
(builtins.filter (port: port.proto == "tcp") vars.ovenNat.forwardPorts);
allowedUDPPorts =
map (port: port.num)
(filter (port: port.proto == "udp") vars.ovenNat.forwardPorts);
(builtins.filter (port: port.proto == "udp") vars.ovenNat.forwardPorts);
};
};

View file

@ -41,10 +41,10 @@ in
# Open ports in the firewall.
networking.firewall.allowedTCPPorts =
map (port: port.num)
(filter (port: port.proto == "tcp") vars.ovenNat.forwardPorts);
(builtins.filter (port: port.proto == "tcp") vars.ovenNat.forwardPorts);
networking.firewall.allowedUDPPorts =
map (port: port.num)
(filter (port: port.proto == "udp") vars.ovenNat.forwardPorts);
(builtins.filter (port: port.proto == "udp") vars.ovenNat.forwardPorts);
# Copy the NixOS configuration file and link it from the resulting system
# (/run/current-system/configuration.nix). This is useful in case you