❯ And how did I advertise the local LAN?
● Let me check the NixOS configuration for tailgate01.
● Searched for 2 patterns, read 1 file (ctrl+o to expand)
● The route is advertised via the services.tailscale-gateway NixOS module at line 50-56. Let me find the module to show you the details.
● Searched for 1 pattern, read 1 file (ctrl+o to expand)
● Here's the chain:
1. hosts/tailgate01/configuration.nix:50-56 — enables the tailscale-gateway module with defaults:
services.tailscale-gateway = {
enable = true;
# advertisedRoutes defaults to host's network (192.168.7.0/24)
};
2. modules/services/tailscale-gateway.nix:70-73 — the advertisedRoutes option defaults to the host's own network, derived from IPAM:
advertisedRoutes = mkOption {
default = [ (getHostNetwork config.networking.hostName) ];
};
3. modules/services/tailscale-gateway.nix:28-40 — getHostNetwork looks up the host's IP via ipam.lib.getHostIP, strips the last octet, and appends .0/24:
getHostNetwork = hostname:
let hostIP = ipam.lib.getHostIP hostname;
match = builtins.match "([0-9]+\\.[0-9]+\\.[0-9]+)\\.[0-9]+" hostIP;
in "${builtins.head match}.0/24";
4. modules/services/tailscale-gateway.nix:258 — the advertised routes are passed as --advertise-routes=192.168.7.0/24 flags to tailscale up:
++ map (route: "--advertise-routes=${route}") cfg.advertisedRoutes;
So the LAN route is never explicitly specified anywhere — it's automatically derived from the host's IP address in IPAM. Since tailgate01's IP is on 192.168.7.x, the
module computes 192.168.7.0/24 and passes it to tailscale up.