diff --git a/modules/services/tailscale.nix b/modules/services/tailscale.nix index 5664ae4..e9771aa 100644 --- a/modules/services/tailscale.nix +++ b/modules/services/tailscale.nix @@ -18,7 +18,7 @@ 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' + /bin/sh -c 'DEV="$(${pkgs.iproute2}/bin/ip -o route get 8.8.8.8 2>/dev/null | ${pkgs.coreutils}/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' ''; }; wantedBy = [ "multi-user.target" ];