Skip to content

Instantly share code, notes, and snippets.

@1eedaegon
Last active September 21, 2025 18:05
Show Gist options
  • Select an option

  • Save 1eedaegon/875a34b5d2e750f0ed05cb0a669eae70 to your computer and use it in GitHub Desktop.

Select an option

Save 1eedaegon/875a34b5d2e750f0ed05cb0a669eae70 to your computer and use it in GitHub Desktop.
tailscaled.serivce
[Unit]
Description=Tailscale node agent
Documentation=https://tailscale.com/kb/
Wants=network-pre.target
After=network-pre.target NetworkManager.service systemd-resolved.service
###### REPLACE $HOME -> Your home
[Service]
ExecStartPre=$HOME/.nix-profile/bin/tailscaled --cleanup
ExecStart=$HOME/.nix-profile/bin/tailscaled --state=/var/lib/tailscale/tailscaled.state --socket=/run/tailscale/tailscaled.sock $FLAGS
ExecStopPost=$HOME/.nix-profile/bin/tailscaled --cleanup
Restart=on-failure
RuntimeDirectory=tailscale
RuntimeDirectoryMode=0755
StateDirectory=tailscale
StateDirectoryMode=0700
CacheDirectory=tailscale
CacheDirectoryMode=0750
Type=notify
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment