tailscale: log added/removed routes

This commit is contained in:
2025-07-15 06:44:19 +00:00
parent 1b181755c7
commit 36f2bcd80c

View File

@@ -127,13 +127,13 @@ in
sleep 2
done
for addr in ${lib.concatStringsSep " " routableSubnets}; do
${ip} route add table main "$addr" dev tailscale0 scope global
(set -x ; ${ip} route add table main "$addr" dev tailscale0 scope global)
done
'')
];
systemd.services.tailscaled.preStop = ''
for addr in ${lib.concatStringsSep " " routableSubnets}; do
${ip} route del table main "$addr" dev tailscale0 scope global || true
(set -x ; ${ip} route del table main "$addr" dev tailscale0 scope global) || true
done
'';
# systemd.network.networks."50-tailscale" = {