tailscale-subnet-router: fix flag generation
1 file changed, 9 insertions(+), 12 deletions(-)
changed files
M system/roles/tailscale-subnet-router.nix → system/roles/tailscale-subnet-router.nix
@@ -5,15 +5,11 @@ ... }: let lan = builtins.head config.networking.nat.internalInterfaces; - withArg = - arg: list: - if list == [ ] || builtins.length list == 1 then - list - else - lib.concatMap (x: [ - arg - x - ]) list; + + networks = [ + "10.0.0.0/16" + "fd12:d04f:65d::/56" + ]; in { networking.firewall.extraForwardRules = ''@@ -21,7 +17,8 @@ iifname "tailscale0" oifname "${lan}" accept iifname "${lan}" oifname "tailscale0" accept ''; - services.tailscale.extraSetFlags = - withArg "--advertise-routes" - config.systemd.network.networks."40-${lan}".address; + services.tailscale.extraSetFlags = [ + "--advertise-routes" + (lib.join "," networks) + ]; }