feat(tailscale): setup tailscale

This commit is contained in:
Khaïs COLIN 2024-08-30 14:01:57 +02:00
parent 7a59ec63a1
commit 25ec3e22b2
2 changed files with 12 additions and 0 deletions

View file

@ -6,6 +6,7 @@ in
imports = [
./hardware-configuration.nix
./openssh.nix
./tailscale.nix
./firewall.nix
./fail2ban.nix
./borgbackup.nix

11
tailscale.nix Normal file
View file

@ -0,0 +1,11 @@
{
networking.nameservers = [ "100.100.100.100" "1.1.1.1" "8.8.8.8" ];
networking.search = [ "hummingbird-stork.ts.net" ];
services.tailscale = {
enable = true;
useRoutingFeatures = "both";
extraUpFlags = [ "--ssh" ];
};
# Tell the firewall to implicitly trust packets routed over Tailscale:
networking.firewall.trustedInterfaces = [ "tailscale0" ];
}