fix: enable nix-command for remote gc and use --sudo
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 21s
All checks were successful
Terraform Plan / Terraform Plan (push) Successful in 21s
This commit is contained in:
@@ -132,7 +132,7 @@ rebuild_node() {
|
|||||||
timeout "$REBUILD_TIMEOUT" nixos-rebuild switch \
|
timeout "$REBUILD_TIMEOUT" nixos-rebuild switch \
|
||||||
--flake "$FLAKE_DIR#$node_name" \
|
--flake "$FLAKE_DIR#$node_name" \
|
||||||
--target-host "$ACTIVE_SSH_USER@$node_ip" \
|
--target-host "$ACTIVE_SSH_USER@$node_ip" \
|
||||||
--use-remote-sudo
|
--sudo
|
||||||
}
|
}
|
||||||
|
|
||||||
rebuild_node_with_retry() {
|
rebuild_node_with_retry() {
|
||||||
@@ -172,7 +172,7 @@ prepare_remote_space() {
|
|||||||
local node_ip="$1"
|
local node_ip="$1"
|
||||||
echo "==> Reclaiming disk space on $node_ip"
|
echo "==> Reclaiming disk space on $node_ip"
|
||||||
remote "$node_ip" "sudo nix-collect-garbage -d || true"
|
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"
|
remote "$node_ip" "sudo rm -rf /tmp/nix* /tmp/nixos-rebuild* || true"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user