fix(fleet): route beskar herdr TMPDIR to /var/tmp and optimise kamino nix store

Merged
SH
17h ago
+29-10

Summary

  • Set TMPDIR=/var/tmp on beskar's herdr-server service so agent and survey scratch writes go to /dev/md2 instead of filling beskar's 32 GiB RAM-backed /tmp tmpfs.
  • Extend named-hosts/kamino/nix-gc.sh to also prune stale t3-browser-rollout gcroots and run nix-store --optimise after nix-collect-garbage to deduplicate the Nix store on worker hosts.
  • Add eval and shellspec coverage for both changes.

Verification

  • shellspec spec/kamino_activation_spec.sh:529 (3 examples, 0 failures)
  • bash -n named-hosts/kamino/nix-gc.sh and shellcheck named-hosts/kamino/nix-gc.sh

Summary by cubic

Sets TMPDIR=/var/tmp on beskar's herdr-server service so agent and survey scratch writes land on /dev/md2 instead of the 32 GiB RAM-backed /tmp tmpfs. Extends kamino's nix-gc.sh to also prune stale t3-browser-rollout gcroots and run nix-store --optimise after nix-collect-garbage to deduplicate the Nix store.

  • nix-store --optimise may take a while and briefly lock the store during worker GC.