summaryrefslogtreecommitdiff
path: root/modules/system/networking/vpn/tailscale.nix
diff options
context:
space:
mode:
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;
+ };
}