diff options
Diffstat (limited to 'modules/core/networking')
| -rw-r--r-- | modules/core/networking/vpn/tailscale.nix | 31 |
1 files changed, 25 insertions, 6 deletions
diff --git a/modules/core/networking/vpn/tailscale.nix b/modules/core/networking/vpn/tailscale.nix index 21f471a..06c5b50 100644 --- a/modules/core/networking/vpn/tailscale.nix +++ b/modules/core/networking/vpn/tailscale.nix @@ -1,15 +1,34 @@ -{ config, ... }: +{ + config, + lib, + pkgs, + ... +}: { 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; }; + + services = { + tailscale = { + enable = true; + useRoutingFeatures = "both"; + }; + + networkd-dispatcher = { + enable = true; + + rules."50-tailscale" = { + onState = [ "routable" ]; + + script = '' + ${lib.getExe pkgs.ethtool} -K enp42s0 rx-udp-gro-forwarding on rx-gro-list off + ''; + }; + }; + }; } |