aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--nixos/routers/router.nix35
1 files changed, 33 insertions, 2 deletions
diff --git a/nixos/routers/router.nix b/nixos/routers/router.nix
index 561f9de..25d12da 100644
--- a/nixos/routers/router.nix
+++ b/nixos/routers/router.nix
@@ -71,7 +71,21 @@ in {
externalInterface = cnf.wan;
internalInterfaces = ["brlan" "brguest"];
};
- dhcpcd.allowInterfaces = [cnf.wan];
+ dhcpcd = {
+ allowInterfaces = [cnf.wan];
+ extraConfig = ''
+ duid
+ noipv6rs
+ waitip 6
+
+ interface ${cnf.wan}
+ ipv6rs
+ iaid 1
+
+ ia_pd 1 brlan
+ #ia_pd 1/::/64 LAN/0/64
+ '';
+ };
nameservers = ["1.1.1.1" "8.8.8.8"];
};
@@ -132,13 +146,30 @@ in {
];
};
};
- # TODO dhcp6
};
systemd.services.kea-dhcp4-server.after = [
"sys-subsystem-net-devices-brlan.device"
"sys-subsystem-net-devices-brguest.device"
];
+ services.radvd = {
+ enable = true;
+ config = ''
+ interface ${cnf.wan} {
+ AdvSendAdvert on;
+ MinRtrAdvInterval 3;
+ MaxRtrAdvInterval 10;
+ prefix ::/64 {
+ AdvOnLink on;
+ AdvAutonomous on;
+ AdvRouterAddr on;
+ };
+ RDNSS 2001:4860:4860::8888 2001:4860:4860::8844 {
+ };
+ };
+ '';
+ };
+
services.kresd = {enable = false;};
networking.nftables.enable = true;