c5a231b pinned the hash by hand because nixpkgs bumped 1.98.8->1.98.9 without
updating vendorHash (NixOS/nixpkgs#545860). The previous commit's lock moves
nixos-26.05 past the point where that fix was promoted from release-26.05, so
the override is now dead weight — and a stale vendorHash override is worse
than none, since it silently wins over a correct upstream value on the next
version bump.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
27 lines
1.1 KiB
Nix
27 lines
1.1 KiB
Nix
{ config, ... }:
|
|
|
|
# Tailscale node joined to the self-hosted headscale control server.
|
|
# Auto-registers on boot from a sops pre-auth key. Requires the importing host
|
|
# to declare `sops.secrets.tailscale_authkey` (see each host's secrets.nix).
|
|
# Not for the VM (no sops).
|
|
{
|
|
services.tailscale = {
|
|
enable = true;
|
|
openFirewall = true; # UDP 41641 for direct connections
|
|
authKeyFile = config.sops.secrets.tailscale_authkey.path;
|
|
extraUpFlags = [ "--login-server=https://vpn.mgaction.town" ];
|
|
};
|
|
# Reach the host's services over the tailnet without opening LAN ports.
|
|
networking.firewall.trustedInterfaces = [ "tailscale0" ];
|
|
|
|
# The upstream unit is a one-shot with no Restart, so a login attempt made
|
|
# before the control server is reachable fails permanently until someone
|
|
# starts it by hand. That's the norm on a first boot — neptun hosts headscale
|
|
# itself, and the other hosts race it. 30s spacing also keeps restarts clear
|
|
# of systemd's default start limit (5 within 10s).
|
|
systemd.services.tailscaled-autoconnect.serviceConfig = {
|
|
Restart = "on-failure";
|
|
RestartSec = 30;
|
|
};
|
|
}
|