cofractal-ams01: switch to tailscale-in-polling mode to reduce logspam and CPU
This commit is contained in:
parent
f0846a9171
commit
389be0c195
3 changed files with 19 additions and 0 deletions
|
@ -74,4 +74,6 @@
|
||||||
|
|
||||||
factorio-mods = import ./factorio-mods args;
|
factorio-mods = import ./factorio-mods args;
|
||||||
libsolv-py = pkgs.callPackage ./libsolv-py.nix { };
|
libsolv-py = pkgs.callPackage ./libsolv-py.nix { };
|
||||||
|
|
||||||
|
tailscale = import ./tailscale pkgs.tailscale;
|
||||||
} // (import ./heptapod-runner args)
|
} // (import ./heptapod-runner args)
|
||||||
|
|
16
nix/pkgs/tailscale/default.nix
Normal file
16
nix/pkgs/tailscale/default.nix
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
tailscale:
|
||||||
|
|
||||||
|
tailscale.overrideAttrs (old: {
|
||||||
|
postPatch = ''
|
||||||
|
${old.postPatch or ""}
|
||||||
|
|
||||||
|
# Always use the polling monitor on routers. The netlink-based monitor is
|
||||||
|
# effectively just a wakeup-every-250ms system which causes ridiculously
|
||||||
|
# high CPU.
|
||||||
|
rm wgengine/monitor/monitor_linux.go
|
||||||
|
substituteInPlace wgengine/monitor/monitor_polling.go \
|
||||||
|
--replace \
|
||||||
|
"//go:build (!linux && !freebsd && !windows && !darwin) || android" \
|
||||||
|
""
|
||||||
|
'';
|
||||||
|
})
|
|
@ -168,6 +168,7 @@ in
|
||||||
}
|
}
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.tailscale.package = depot.nix.pkgs.tailscale;
|
||||||
systemd.network.config.networkConfig.ManageForeignRoutes = "no";
|
systemd.network.config.networkConfig.ManageForeignRoutes = "no";
|
||||||
systemd.mounts = let
|
systemd.mounts = let
|
||||||
bindMount' = dir: {
|
bindMount' = dir: {
|
||||||
|
|
Loading…
Reference in a new issue