From dec36d2e9aaca7ca7149a244aa984e97925a3dba Mon Sep 17 00:00:00 2001 From: adikro Date: Sun, 17 May 2026 01:05:14 +0200 Subject: moved ssh and tailscale to srv, revamped netwroking modules --- os/srv/firewall.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 os/srv/firewall.nix (limited to 'os/srv/firewall.nix') diff --git a/os/srv/firewall.nix b/os/srv/firewall.nix new file mode 100644 index 0000000..9242007 --- /dev/null +++ b/os/srv/firewall.nix @@ -0,0 +1,22 @@ +{ config, lib, ... }: +let + cfg = config.os.srv.firewall; +in +{ + options.os.srv.firewall = { + enable = lib.mkEnableOption "enables the firewall"; + }; + + config = lib.mkIf cfg.enable { + networking = { + nftables.enable = true; + + firewall = { + enable = true; + + allowedTCPPorts = [ ]; + allowedUDPPorts = [ ]; + }; + }; + }; +} -- cgit v1.3