1
1
Fork 1
mirror of https://github.com/oddlama/nix-config.git synced 2025-10-10 23:00:39 +02:00

fix(nftables): fix missing migration to new nftables firewall branch

This commit is contained in:
oddlama 2023-10-15 16:36:16 +02:00
parent 1ae55fa9f6
commit 3e0e03fc31
No known key found for this signature in database
GPG key ID: 14EFE510775FE39A

View file

@ -9,7 +9,6 @@
attrNames
flip
mdDoc
mkForce
mkIf
mkMerge
mkOption
@ -53,7 +52,7 @@ in {
}));
networking.nftables.firewall = mkMerge (flip map (attrNames cfg) (proxy: {
zones = mkForce {
zones = {
# Parent zone for the whole interface
${cfg.${proxy}.nicName}.interfaces = [cfg.${proxy}.nicName];
# Subzone to specifically target the proxy host
@ -64,17 +63,15 @@ in {
};
};
rules = mkForce {
"${proxy}-to-local" = {
from = [proxy];
to = ["local"];
rules."${proxy}-to-local" = {
from = [proxy];
to = ["local"];
inherit
(cfg.${proxy})
allowedTCPPorts
allowedUDPPorts
;
};
inherit
(cfg.${proxy})
allowedTCPPorts
allowedUDPPorts
;
};
}));
};