From 5b46902a1e0e32ff41eedbf8cc4974010e9df9c4 Mon Sep 17 00:00:00 2001 From: Ryan Omasta Date: Thu, 22 May 2025 16:12:55 -0600 Subject: [PATCH] nixos/tailscale: run `tailscale up` when in Stopped status --- nixos/modules/services/networking/tailscale.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nixos/modules/services/networking/tailscale.nix b/nixos/modules/services/networking/tailscale.nix index 0b6e110d2caa..f8ca5318538c 100644 --- a/nixos/modules/services/networking/tailscale.nix +++ b/nixos/modules/services/networking/tailscale.nix @@ -213,7 +213,7 @@ in if [[ "$state" != "$lastState" ]]; then # https://github.com/tailscale/tailscale/blob/v1.72.1/ipn/backend.go#L24-L32 case "$state" in - NeedsLogin) + NeedsLogin|NeedsMachineAuth|Stopped) echo "Server needs authentication, sending auth key" tailscale up --auth-key "$(cat ${cfg.authKeyFile})${params}" ${escapeShellArgs cfg.extraUpFlags} ;;