diff options
author | Karel Kočí <cynerd@email.cz> | 2023-03-10 09:50:16 +0100 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2023-03-10 09:50:16 +0100 |
commit | 2c08e3423ab4752fd891057a0100fd451725dc45 (patch) | |
tree | 5eaf21b65718f45e38759bb9afbcbaa521715146 | |
parent | ebb69064849b13cb0170b773c5ddfd5739d7efc5 (diff) | |
download | nixos-personal-2c08e3423ab4752fd891057a0100fd451725dc45.tar.gz nixos-personal-2c08e3423ab4752fd891057a0100fd451725dc45.tar.bz2 nixos-personal-2c08e3423ab4752fd891057a0100fd451725dc45.zip |
nixos/router: try to add IPv6 support
-rw-r--r-- | nixos/routers/router.nix | 35 |
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; |