diff options
Diffstat (limited to 'hosts')
| -rw-r--r-- | hosts/cloud/networking.nix | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/hosts/cloud/networking.nix b/hosts/cloud/networking.nix index ea37472..71af8e1 100644 --- a/hosts/cloud/networking.nix +++ b/hosts/cloud/networking.nix @@ -1,10 +1,15 @@ -{ lib, ... }: +{ lib, config, ... }: { networking.dhcpcd.enable = false; networking.firewall.enable = true; # TODO: configure automatically in the module - networking.firewall.allowedUDPPorts = [ 51820 ]; + networking.firewall.allowedUDPPorts = + let + wg-nets = lib.filter (net: net.hosts.cloud.endpoint.enable) config.oxalab.wg; + wg-ports = map (net: net.hosts.cloud.endpoint.port) wg-nets; + in + wg-ports; networking.useNetworkd = true; systemd.network.enable = true; |
