all repos — nixfiles @ 2b2a0517bb8ca00cf7429fb230da7befa586735c

System and user configuration, managed by nix and home-manager

extract server tailscale configuration

Alin
commit

2b2a0517bb8ca00cf7429fb230da7befa586735c

parent

0d8b0585dc4966c0b9c1b88f3060a862719b2fb6

M system/hosts/linde.nix → system/hosts/linde.nix
@@ -253,7 +253,6 @@ 6885 # DHT
6922 ]; trustedInterfaces = [ - "tailscale0" "podman0" ]; };
@@ -271,16 +270,6 @@ DNSSEC = true;
}; }; systemd.network.wait-online.enable = lib.mkForce true; - - services.tailscale = { - enable = true; - openFirewall = true; - extraUpFlags = [ "--accept-routes" ]; - extraSetFlags = [ - "--advertise-exit-node" - ]; - useRoutingFeatures = "both"; - }; services.mycal = { enable = true;
M system/hosts/smrk.nix → system/hosts/smrk.nix
@@ -86,9 +86,6 @@ ];
allowedUDPPorts = [ 443 ]; - trustedInterfaces = [ - "tailscale0" - ]; }; };
@@ -105,15 +102,6 @@ dates = [ "02:30" ];
}; }; - services.tailscale = { - enable = true; - openFirewall = true; - extraUpFlags = [ "--accept-routes" ]; - extraSetFlags = [ - "--advertise-exit-node" - ]; - useRoutingFeatures = "both"; - }; users.defaultUserShell = config.programs.fish.package; programs.fish = { enable = true;
M system/roles/server.nix → system/roles/server.nix
@@ -2,6 +2,15 @@ { ... }:
{ imports = [ ../settings/configuration/nix-linux.nix + + ../settings/services/tailscale.nix ../settings/services/caddy.nix ]; + + services.tailscale = { + useRoutingFeatures = "both"; + extraSetFlags = [ + "--advertise-exit-node" + ]; + }; }
A system/settings/services/tailscale.nix
@@ -0,0 +1,12 @@
+{ ... }: +{ + services.tailscale = { + enable = true; + openFirewall = true; + extraSetFlags = [ + "--accept-routes" + ]; + }; + + networking.firewall.trustedInterfaces = [ "tailscale0" ]; +}