diff options
| author | Fuwn <[email protected]> | 2024-09-05 02:49:29 -0700 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2024-09-05 02:49:29 -0700 |
| commit | 9e0867dcd9e0caaa5ef73061e9c7a3375d45f0fb (patch) | |
| tree | f1421d282f33eb6954475819dda043175e076964 /modules/system/networking/vpn/tailscale.nix | |
| parent | Bump (diff) | |
| download | nixos-config-9e0867dcd9e0caaa5ef73061e9c7a3375d45f0fb.tar.xz nixos-config-9e0867dcd9e0caaa5ef73061e9c7a3375d45f0fb.zip | |
Bump
Diffstat (limited to 'modules/system/networking/vpn/tailscale.nix')
| -rw-r--r-- | modules/system/networking/vpn/tailscale.nix | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/modules/system/networking/vpn/tailscale.nix b/modules/system/networking/vpn/tailscale.nix index 5d51594..21f471a 100644 --- a/modules/system/networking/vpn/tailscale.nix +++ b/modules/system/networking/vpn/tailscale.nix @@ -1,4 +1,15 @@ +{ config, ... }: { - services.tailscale.enable = true; - networking.firewall.trustedInterfaces = [ "tailscale0" ]; + networking.firewall.trustedInterfaces = [ "${config.services.tailscale.interfaceName}" ]; + + services.tailscale = { + enable = true; + useRoutingFeatures = "both"; + }; + + # <https://tailscale.com/kb/1019/subnets/?tab=linux#step-1-install-the-tailscale-client> + boot.kernel.sysctl = { + "net.ipv4.ip_forward" = true; + "net.ipv6.conf.all.forwarding" = true; + }; } |