Archived
Check NixOS configurations / eval-hosts (pull_request) Failing after 11m52s
exit-node.nix advertised --advertise-exit-node/--advertise-routes but never enabled IP forwarding, so it wouldn't actually route traffic. services.tailscale.useRoutingFeatures = "server" is the built-in way to get the sysctls right without duplicating modules/networking/enable-ip-forwarding.nix. Also opens the firewall for direct (non-DERP-relayed) peer connections, and now imports enable-service.nix instead of duplicating `enable = true`, so "plain tailscale" and "tailscale exit node" are two composable modules. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
21 lines
496 B
Nix
21 lines
496 B
Nix
{ vars, ... }:
|
|
|
|
{
|
|
imports = [ ./enable-service.nix ];
|
|
|
|
services.tailscale = {
|
|
# Enables the sysctl forwarding settings exit nodes/subnet routers need;
|
|
# without this, --advertise-exit-node has no effect.
|
|
useRoutingFeatures = "server";
|
|
|
|
# Lets peers reach this node directly over the tailscale UDP port
|
|
# instead of relaying through DERP.
|
|
openFirewall = true;
|
|
|
|
extraUpFlags = [
|
|
"--advertise-exit-node"
|
|
"--advertise-routes=${vars.lanCidr}"
|
|
];
|
|
};
|
|
}
|