diff options
| author | scouckel <james.krinsky@gmail.com> | 2026-01-11 00:25:41 -0500 |
|---|---|---|
| committer | scouckel <james.krinsky@gmail.com> | 2026-01-11 00:25:41 -0500 |
| commit | f6a72d7ad9bec7cc7beefa8542fb91127a88f965 (patch) | |
| tree | d7faa401a6641c0d0bb04ca7c35a78c194e866e9 /modules/nixos/tailscale.nix | |
| parent | 75e8689700d2bec1bd216f1a75d62535c1b2dc60 (diff) | |
tailscale test
Diffstat (limited to 'modules/nixos/tailscale.nix')
| -rw-r--r-- | modules/nixos/tailscale.nix | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/modules/nixos/tailscale.nix b/modules/nixos/tailscale.nix new file mode 100644 index 0000000..9cba982 --- /dev/null +++ b/modules/nixos/tailscale.nix @@ -0,0 +1,25 @@ +{ config, ... }: + +{ + # 1. Enable the service and the firewall + services.tailscale.enable = true; + networking.nftables.enable = true; + networking.firewall = { + enable = true; + # Always allow traffic from your Tailscale network + trustedInterfaces = [ "tailscale0" ]; + # Allow the Tailscale UDP port through the firewall + allowedUDPPorts = [ config.services.tailscale.port ]; + }; + + # 2. Force tailscaled to use nftables (Critical for clean nftables-only systems) + # This avoids the "iptables-compat" translation layer issues. + systemd.services.tailscaled.serviceConfig.Environment = [ + "TS_DEBUG_FIREWALL_MODE=nftables" + ]; + + # 3. Optimization: Prevent systemd from waiting for network online + # (Optional but recommended for faster boot with VPNs) + systemd.network.wait-online.enable = false; + boot.initrd.systemd.network.wait-online.enable = false; + } |
