flake/nixos/tailscale.nix

21 lines
705 B
Nix
Raw Normal View History

{ user, ...}:
2024-11-16 13:38:09 -05:00
{
services.tailscale = {
enable = true;
2024-11-16 19:25:31 -05:00
# When using this configuration, make sure to create a file at /run/secrets/tailscale
# with the contents of your Tailscale auth key.
# Make sure your permissions are set correctly, e.g. 0600.
# The secret file will be automatically deleted on system reboot.
# You do not need to recreate it again unless you remove the system from your Tailscale account.
2024-11-16 19:25:31 -05:00
authKeyFile = "/run/secrets/tailscale";
# change this to "server" if you are this device as an exit node
useRoutingFeatures = "client";
extraUpFlags = [
"--ssh"
"--accept-routes"
"--accept-dns"
"--operator=${user}"
];
2024-11-16 13:38:09 -05:00
};
}