From 6fd15f1080faa81ad1386f652e7f8f9c82941545 Mon Sep 17 00:00:00 2001 From: Luke Granger-Brown Date: Sat, 21 Jan 2023 19:54:18 +0000 Subject: [PATCH] kerrigan: configure radvd for IPv6 forwarding --- ops/nixos/kerrigan/default.nix | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/ops/nixos/kerrigan/default.nix b/ops/nixos/kerrigan/default.nix index 75c8f9d35c..8a7751482a 100644 --- a/ops/nixos/kerrigan/default.nix +++ b/ops/nixos/kerrigan/default.nix @@ -30,6 +30,12 @@ in boot.kernelParams = [ "console=ttyS0,115200n8" ]; boot.initrd.kernelModules = [ "phy-mvebu-cp110-utmi" ]; + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = "1"; + "net.ipv6.conf.default.forwarding" = "1"; + "net.ipv6.conf.all.forwarding" = "1"; + }; + networking = { hostName = "kerrigan"; domain = "as205479.net"; @@ -75,5 +81,21 @@ in ${populate-boot-builder} -c ${config.system.build.toplevel} -d ./files/boot ''; + services.radvd = { + enable = true; + config = '' + interface br0 { + AdvSendAdvert on; + AdvLinkMTU 1280; + + prefix ffff:ffff:ffff:ffff::/64 { + Base6Interface wwan0; + AdvValidLifetime 600; + AdvPreferredLifetime 300; + } + } + ''; + }; + system.stateVersion = "23.05"; }