Worktree crispy churning kernighan #102

Merged
beatzaplenty merged 2 commits from worktree-crispy-churning-kernighan into main 2026-07-29 03:46:06 +00:00
Showing only changes of commit 0ef8259225 - Show all commits
+5 -2
View File
@@ -121,7 +121,7 @@ if [[ "$DRY_RUN" -eq 1 ]]; then
echo " ssh ${SSH_OPTS[*]} $target 'sudo -n nix-collect-garbage -d'" echo " ssh ${SSH_OPTS[*]} $target 'sudo -n nix-collect-garbage -d'"
echo " # fallback: ssh ... $target 'nix-collect-garbage -d'" echo " # fallback: ssh ... $target 'nix-collect-garbage -d'"
else else
echo " ssh ${SSH_OPTS[*]} $target 'nix-collect-garbage -d'" echo " ssh ${SSH_OPTS[*]} $target '. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh && nix-collect-garbage -d'"
fi fi
done done
exit 0 exit 0
@@ -147,7 +147,10 @@ gc_one() {
echo "ok(user)"; return echo "ok(user)"; return
fi fi
else else
if ssh "${SSH_OPTS[@]}" "$target" "nix-collect-garbage -d" \ # Non-NixOS node: BatchMode SSH doesn't source the Nix daemon profile, so
# nix-collect-garbage won't be on PATH unless we source it explicitly.
local nix_profile='. /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh 2>/dev/null || true'
if ssh "${SSH_OPTS[@]}" "$target" "$nix_profile && nix-collect-garbage -d" \
>>"$logfile" 2>>"$logfile"; then >>"$logfile" 2>>"$logfile"; then
echo "ok"; return echo "ok"; return
fi fi