Merge pull request 'fix: enable nix-command for remote gc and use --sudo' (#60) from stage into master
Some checks failed
Terraform Apply / Terraform Apply (push) Failing after 2m55s

Reviewed-on: #60
This commit was merged in pull request #60.
This commit is contained in:
2026-02-28 22:58:28 +00:00

View File

@@ -132,7 +132,7 @@ rebuild_node() {
timeout "$REBUILD_TIMEOUT" nixos-rebuild switch \
--flake "$FLAKE_DIR#$node_name" \
--target-host "$ACTIVE_SSH_USER@$node_ip" \
--use-remote-sudo
--sudo
}
rebuild_node_with_retry() {
@@ -172,7 +172,7 @@ prepare_remote_space() {
local node_ip="$1"
echo "==> Reclaiming disk space on $node_ip"
remote "$node_ip" "sudo nix-collect-garbage -d || true"
remote "$node_ip" "sudo nix store gc || true"
remote "$node_ip" "sudo nix --extra-experimental-features nix-command store gc || true"
remote "$node_ip" "sudo rm -rf /tmp/nix* /tmp/nixos-rebuild* || true"
}