26 lines
825 B
Nix
26 lines
825 B
Nix
{ pkgs, ... }:
|
|
{
|
|
services.tailscale.enable = true;
|
|
services.tailscale.port = 41641;
|
|
services.tailscale.useRoutingFeatures = "server";
|
|
services.tailscale.extraUpFlags = [
|
|
"--ssh"
|
|
"--advertise-exit-node"
|
|
"--hostname=bucur"
|
|
];
|
|
|
|
environment.systemPackages = [ pkgs.ethtool ];
|
|
|
|
systemd.services.tailscale-offload-tune = {
|
|
description = "Disable GRO forwarding for Tailscale exit node performance";
|
|
after = [ "network-online.target" ];
|
|
wants = [ "network-online.target" ];
|
|
serviceConfig = {
|
|
Type = "oneshot";
|
|
ExecStart = ''
|
|
/bin/sh -c '${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 | ${pkgs.coreutils}/bin/cut -f 5 -d " " | xargs -r ${pkgs.ethtool}/bin/ethtool -K rx-udp-gro-forwarding on rx-gro-list off'
|
|
'';
|
|
};
|
|
wantedBy = [ "multi-user.target" ];
|
|
};
|
|
}
|