2026-02-07 20:03:10 +02:00
|
|
|
{ pkgs, ... }:
|
2026-02-05 17:57:02 +02:00
|
|
|
{
|
|
|
|
|
services.tailscale.enable = true;
|
|
|
|
|
services.tailscale.port = 41641;
|
2026-02-07 20:00:04 +02:00
|
|
|
services.tailscale.useRoutingFeatures = "server";
|
|
|
|
|
services.tailscale.extraUpFlags = [
|
|
|
|
|
"--ssh"
|
|
|
|
|
"--advertise-exit-node"
|
|
|
|
|
"--hostname=bucur"
|
|
|
|
|
];
|
2026-02-07 20:03:10 +02:00
|
|
|
|
|
|
|
|
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 = ''
|
2026-02-07 20:05:35 +02:00
|
|
|
/bin/sh -c 'DEV="$(${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 2>/dev/null | ${pkgs.gawk}/bin/awk "{for (i=1;i<=NF;i++) if (\\$i==\\\"dev\\\") {print \\$(i+1); exit}}")"; if [ -n "$DEV" ]; then ${pkgs.ethtool}/bin/ethtool -K "$DEV" rx-udp-gro-forwarding on rx-gro-list off || true; fi'
|
2026-02-07 20:03:10 +02:00
|
|
|
'';
|
|
|
|
|
};
|
|
|
|
|
wantedBy = [ "multi-user.target" ];
|
|
|
|
|
};
|
2026-02-05 17:57:02 +02:00
|
|
|
}
|