initial commit

This commit is contained in:
2026-07-11 14:56:13 -04:00
commit 26af7b2dcd
15 changed files with 684 additions and 0 deletions
+28
View File
@@ -0,0 +1,28 @@
{ config, lib, pkgs, ... }:
{
networking.firewall.enable = true;
networking.firewall.allowedTCPPorts = [ 80 443 ];
networking.nftables.enable = true;
networking.nftables.tables.nat = {
family = "ip";
content = ''
chain prerouting {
type nat hook prerouting priority dstnat; policy accept;
iifname "enp1s0" tcp dport 80 dnat to 10.0.0.2:80
iifname "enp1s0" tcp dport 443 dnat to 10.0.0.2:443
}
chain postrouting {
type nat hook postrouting priority srcnat; policy accept;
oifname "wg0" masquerade
}
'';
};
boot.kernel.sysctl = {
"net.ipv4.ip_forward" = 1;
};
}