From d41e5e7594d6975075d1fae67686ab8c377b0f37 Mon Sep 17 00:00:00 2001 From: Ari Sosnovsky Date: Mon, 19 Aug 2024 11:17:37 -0400 Subject: [PATCH] Firewall rules --- hosts/hl-minipc1.nix | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/hosts/hl-minipc1.nix b/hosts/hl-minipc1.nix index 61234e7..b55a0d0 100644 --- a/hosts/hl-minipc1.nix +++ b/hosts/hl-minipc1.nix @@ -1,5 +1,14 @@ { user }: -{ pkgs, lib, config, ... }: { +{ pkgs, lib, config, ... }: +let + openPorts = [ + 5000 + 5001 + 8000 + 22 + ]; +in +{ imports = [ ./hl-minipc1.hardware-configuration.nix ]; skyg.user.enabled = true; skyg.nixos.common.ssh-server.enabled = true; @@ -39,5 +48,8 @@ listenAddress = "0.0.0.0"; enableDelete = true; }; + # Firewall + networking.firewall.allowedUDPPorts = openPorts; + networking.firewall.allowedTCPPorts = openPorts; }