Files
2026-07-12 11:15:42 -05:00

31 lines
747 B
Nix

{ config, lib, ... }:
let
cfg = config.workstation.networking.tailscale;
user = config.workstation.networking.user;
in
{
config = lib.mkIf cfg.enable {
services.tailscale = {
enable = true;
openFirewall = true;
extraSetFlags = [ "--operator=${user}" ];
};
networking.firewall = {
trustedInterfaces = [ config.services.tailscale.interfaceName ];
allowedUDPPorts = [ config.services.tailscale.port ];
};
systemd.services.tailscaled.serviceConfig.Environment = [
"TS_DEBUG_FIREWALL_MODE=nftables"
];
systemd.network.wait-online.enable = false;
boot.initrd.systemd.network.wait-online.enable = false;
users.users.${user}.extraGroups = [
"tailscale"
];
};
}