✨ darkone.service.tailscale
Tailscale client of the DNF tailnet (headscale on the HCS).
Joins the HCS, zone gateways (isGateway: zone subnet advertised, routes
accepted, own resolver kept) and roaming hosts.
Sub-modules (tailscale/):
cert-sync.nix: zone gateways pull the HCS Caddy certificates;selfheal.nix: watchdog restarting a disconnected tailscaled;autopause.nix: roaming clients pause tailscale on a zone LAN.
Certificate sync (cert-sync.nix)
Section titled “Certificate sync (cert-sync.nix)”Public certificates are issued on the HCS only; each zone gateway pulls the
whole Caddy storage over the tailnet (rsync as nix, elevated to caddy on
the HCS side), then publishes it to its own Caddy.
Self-heal (selfheal.nix)
Section titled “Self-heal (selfheal.nix)”Every minute, checks that the backend runs and the control plane sees the
node online; restarts tailscaled after a sustained loss. Exports
dnf_tailscale_* metrics for the TailscaleFlapping/TailscaleUnhealthy
alerts.
Auto-pause (autopause.nix)
Section titled “Auto-pause (autopause.nix)”Roaming clients only. On a DNF zone LAN, --accept-dns would hijack
resolv.conf (local dnsmasq/AdGuard) and --accept-routes collide with the
connected zone subnet: a NetworkManager dispatcher pauses tailscale there
and resumes it elsewhere.
Options
Section titled “Options”- enable
boolEnable tailscale client to connect HCS - isGateway
boolThis tailscale node is a subnet gateway - isExitNode
boolConfigure this client as exit node - selfHeal.enable
boolWatchdog: detect headscale disconnection and restart tailscaled. - autoPauseOnLan.enable
boolRoaming client: pause tailscale (down) while plugged into a known DNF zone LAN, resume it elsewhere. Non-gateway NetworkManager clients only. - shared
rawTailscale values shared with thetailscale/sub-modules.
darkone.service.tailscale = { enable = false; isGateway = false; isExitNode = false; selfHeal.enable = true; autoPauseOnLan.enable = false; shared = { inherit tsBin isHcsSubnetGateway selfHealEnable selfHealStateDir autoPauseEnable autoPauseStateFile ; };};Source: modules/service/tailscale.nix 🡕