docs: fix stale wake caveat, add <parent> sentinel + systemd path gotcha
turn-loop.md: - remove stale "Agent-only today" note from hive wake (fixed by #698) - add <parent> sentinel to send tool description (added by #703) gotchas.md: - add systemd.services.*.path /bin auto-append gotcha (hit by #672/#705)
This commit is contained in:
parent
c41bf1b562
commit
31288ae760
2 changed files with 27 additions and 3 deletions
|
|
@ -39,6 +39,28 @@ claude's Bash tool without editing the service definition.
|
|||
`environment.HYPERHIVE_GIT` bakes git's absolute path in (read by
|
||||
`lifecycle::git_command()`) for the host.
|
||||
|
||||
## `systemd.services.*.path` appends `/bin` to every entry
|
||||
|
||||
NixOS's `systemd.services.<unit>.path` list feeds every entry through
|
||||
`lib.makeBinPath`, which **appends `/bin` unconditionally**. That's
|
||||
the right thing for Nix packages (their `outPath` is the store root,
|
||||
not the `bin/` subdir), but it bites when you pass a string that
|
||||
already ends with `/bin`:
|
||||
|
||||
```nix
|
||||
# ❌ /run/wrappers/bin → /run/wrappers/bin/bin (does not exist)
|
||||
path = [ "/run/wrappers/bin" "/run/current-system/sw" ];
|
||||
|
||||
# ✅ /run/wrappers → /run/wrappers/bin (the real wrappers dir)
|
||||
path = [ "/run/wrappers" "/run/current-system/sw" ];
|
||||
```
|
||||
|
||||
The bug is silent: `nix eval` succeeds, the unit starts, but PATH
|
||||
contains a non-existent directory. The first symptom is usually
|
||||
`sudo: must be owned by uid 0 and have the setuid bit set` because
|
||||
the setuid sudo wrapper lives at `/run/wrappers/bin/sudo` and
|
||||
the path entry resolves to `/run/wrappers/bin/bin` instead.
|
||||
|
||||
## `RuntimeDirectoryPreserve = "yes"`
|
||||
|
||||
…keeps `/run/hyperhive/` (and the per-agent sub-dirs) across
|
||||
|
|
|
|||
Loading…
Reference in a new issue