From 1ce7046994c518f143a961bd33975659ef67c6af Mon Sep 17 00:00:00 2001 From: Miguel Palhas Date: Fri, 21 Aug 2026 20:32:36 +0100 Subject: [PATCH] fix(aoe-web): pin TMUX_TMPDIR and KillMode=process Shells set TMUX_TMPDIR to the runtime dir; the unit did not, so the daemon ran a second tmux server under /tmp. Every boot resumed duplicate agents there, the dashboard diverged from the TUI, and polling the invisible sessions fired an error push per session. Same fix pr-daemon got. Co-Authored-By: Claude Fable 5 --- home/yolo/services.nix | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/home/yolo/services.nix b/home/yolo/services.nix index d436fca..d2983b2 100644 --- a/home/yolo/services.nix +++ b/home/yolo/services.nix @@ -87,9 +87,18 @@ in # is set; --allowed-host is what makes the rebinding gate accept a # hostname under a wildcard bind (an IP literal needs no flag). ExecStart = "${aoe}/bin/aoe serve --host 0.0.0.0 --port 8080 --auth none --behind-proxy --allowed-host aoe.n62.casa"; - Environment = [ "PATH=${toolPath}" ]; + # TMUX_TMPDIR keeps the daemon on the same tmux server the shell and + # TUI use, instead of a second one under /tmp (same bug pr-daemon had). + Environment = [ + "PATH=${toolPath}" + "TMUX_TMPDIR=%t" + ]; Restart = "always"; RestartSec = 2; + # If this unit boots before any shell, the shared tmux server lands in + # its cgroup; the default control-group kill would take every session + # down on restart. + KillMode = "process"; }; Install.WantedBy = [ "default.target" ]; };