aboutsummaryrefslogtreecommitdiff
path: root/nixos/modules/router.nix
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2024-09-11 12:41:12 +0200
committerKarel Kočí <cynerd@email.cz>2024-09-11 12:45:54 +0200
commitd1309a4e463d448cdfc07974d2aa96a39d4a366e (patch)
tree8df457cdb3e1060be9cd970c6f339c2c557efd76 /nixos/modules/router.nix
parent13d71893093003810fff328e2e980f22961cfd6f (diff)
downloadnixos-personal-d1309a4e463d448cdfc07974d2aa96a39d4a366e.tar.gz
nixos-personal-d1309a4e463d448cdfc07974d2aa96a39d4a366e.tar.bz2
nixos-personal-d1309a4e463d448cdfc07974d2aa96a39d4a366e.zip
System update
Diffstat (limited to 'nixos/modules/router.nix')
-rw-r--r--nixos/modules/router.nix8
1 files changed, 6 insertions, 2 deletions
diff --git a/nixos/modules/router.nix b/nixos/modules/router.nix
index cd37d8b..224037b 100644
--- a/nixos/modules/router.nix
+++ b/nixos/modules/router.nix
@@ -56,6 +56,8 @@ in {
};
config = mkIf cnf.enable {
+ boot.kernel.sysctl."net.ipv6.conf.all.forwarding" = 1;
+
networking = {
useNetworkd = true;
firewall = {
@@ -114,9 +116,10 @@ in {
matchConfig.Name = "home";
networkConfig = {
Address = "${cnf.lanIP}/${toString cnf.lanPrefix}";
- IPForward = "yes";
+ IPv4Forwarding = "yes";
DHCPServer = "yes";
DHCPPrefixDelegation = "yes";
+ IPv6Forwarding = "yes";
IPv6SendRA = "yes";
IPv6AcceptRA = "no";
};
@@ -143,9 +146,10 @@ in {
matchConfig.Name = "guest";
networkConfig = {
Address = "192.168.1.1/24";
- IPForward = "yes";
+ IPv4Forwarding = "yes";
DHCPServer = "yes";
DHCPPrefixDelegation = "yes";
+ IPv6Forwarding = "yes";
IPv6SendRA = "yes";
IPv6AcceptRA = "no";
};