Personal Nix setup

Add IPv6 options

Changed files
+5 -3
modules
+3 -1
modules/router/kernel.nix
···
"net.ipv4.tcp_syncookies" = true;
"net.ipv6.conf.all.forwarding" = true;
-
"net.ipv6.conf.all.accept_ra" = 2;
+
"net.ipv6.conf.all.accept_ra" = if cfg.ipv6 then 2 else false;
+
"net.ipv6.conf.all.autoconf" = false;
+
"net.ipv6.conf.all.use_tempaddr" = false;
"kernel.kptr_restrict" = 2;
"kernel.dmesg_restrict" = 0;
+2 -2
modules/router/network.nix
···
Address = intern.cidr;
DHCPServer = true;
IPv4Forwarding = true;
-
IPv6Forwarding = true;
-
IPMasquerade = "both";
+
IPv6Forwarding = cfg.ipv6;
+
IPMasquerade = if cfg.ipv6 then "ipv4" else "both";
ConfigureWithoutCarrier = true;
MulticastDNS = cfg.mdns;
DHCPPrefixDelegation = cfg.ipv6;