From 45e818b1131a22b8740707a0f82f64fa12b41826 Mon Sep 17 00:00:00 2001 From: MichaelFisher1997 Date: Sat, 28 Feb 2026 22:55:05 +0000 Subject: [PATCH] fix: enable nix-command for remote gc and use --sudo --- nixos/kubeadm/scripts/rebuild-and-bootstrap.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/kubeadm/scripts/rebuild-and-bootstrap.sh b/nixos/kubeadm/scripts/rebuild-and-bootstrap.sh index c38431b..6e94150 100755 --- a/nixos/kubeadm/scripts/rebuild-and-bootstrap.sh +++ b/nixos/kubeadm/scripts/rebuild-and-bootstrap.sh @@ -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" }