fix(gc-hosts): fix pve1 PATH and discovery sudo prompts #103

Merged
beatzaplenty merged 1 commits from worktree-crispy-churning-kernighan into main 2026-07-29 03:53:51 +00:00
Owner

Two bugs:

  1. Dynamic discovery used BatchMode=yes for the pct/qm list SSH call, which
    silently suppressed any sudo password prompt and returned empty output.
    Fix: split SSH_OPTS into SSH_OPTS (BatchMode, for gc) and SSH_QUERY_OPTS
    (no BatchMode, for discovery) so sudo can prompt when needed.

  2. pve1 gc used a non-login SSH session which doesn't source /etc/profile,
    so nix-collect-garbage was never on PATH. The Nix installer registers
    itself via /etc/profile.d/nix-daemon.sh which only runs in login shells.
    Fix: use "bash -l -c 'nix-collect-garbage -d'" instead.

Co-Authored-By: Claude Sonnet 4.6 noreply@anthropic.com

Two bugs: 1. Dynamic discovery used BatchMode=yes for the pct/qm list SSH call, which silently suppressed any sudo password prompt and returned empty output. Fix: split SSH_OPTS into SSH_OPTS (BatchMode, for gc) and SSH_QUERY_OPTS (no BatchMode, for discovery) so sudo can prompt when needed. 2. pve1 gc used a non-login SSH session which doesn't source /etc/profile, so nix-collect-garbage was never on PATH. The Nix installer registers itself via /etc/profile.d/nix-daemon.sh which only runs in login shells. Fix: use "bash -l -c 'nix-collect-garbage -d'" instead. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
beatzaplenty added 1 commit 2026-07-29 03:53:48 +00:00
fix(gc-hosts): fix pve1 PATH and discovery sudo prompts
Check NixOS configurations / eval-hosts (pull_request) Successful in 10m45s
7b4794211d
Two bugs:

1. Dynamic discovery used BatchMode=yes for the pct/qm list SSH call, which
   silently suppressed any sudo password prompt and returned empty output.
   Fix: split SSH_OPTS into SSH_OPTS (BatchMode, for gc) and SSH_QUERY_OPTS
   (no BatchMode, for discovery) so sudo can prompt when needed.

2. pve1 gc used a non-login SSH session which doesn't source /etc/profile,
   so nix-collect-garbage was never on PATH. The Nix installer registers
   itself via /etc/profile.d/nix-daemon.sh which only runs in login shells.
   Fix: use "bash -l -c 'nix-collect-garbage -d'" instead.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
beatzaplenty merged commit b5e61d62bd into main 2026-07-29 03:53:51 +00:00
This repo is archived. You cannot comment on pull requests.
No Reviewers
No labels
1 Participants
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: beatzaplenty/nixos#103