summaryrefslogtreecommitdiff
path: root/os/srv/firewall.nix
diff options
context:
space:
mode:
authoradikro <adikro@disroot.org>2026-05-17 01:05:14 +0200
committeradikro <adikro@disroot.org>2026-05-17 01:05:14 +0200
commitdec36d2e9aaca7ca7149a244aa984e97925a3dba (patch)
treebdf3ec35e101beaa4e74c48930dca4341d48ae2c /os/srv/firewall.nix
parent8bedd672ac49617d2e3a808efe470228cbb0240d (diff)
moved ssh and tailscale to srv, revamped netwroking modules
Diffstat (limited to 'os/srv/firewall.nix')
-rw-r--r--os/srv/firewall.nix22
1 files changed, 22 insertions, 0 deletions
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 = [ ];
+ };
+ };
+ };
+}