summaryrefslogtreecommitdiff
path: root/modules/system/networking/vpn/tailscale.nix
diff options
context:
space:
mode:
authorFuwn <[email protected]>2024-09-05 02:49:29 -0700
committerFuwn <[email protected]>2024-09-05 02:49:29 -0700
commit9e0867dcd9e0caaa5ef73061e9c7a3375d45f0fb (patch)
treef1421d282f33eb6954475819dda043175e076964 /modules/system/networking/vpn/tailscale.nix
parentBump (diff)
downloadnixos-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.nix15
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;
+ };
}