[PATCH 8/8] nixos: drop hardcoded /xfs1 path from clean_nixos_cache

Daniel Gomez <[email protected]> Thu, 23 Apr 2026 00:48:46 +0200
Newsgroups dev.linux.lists.kdevops
Message-ID <20260423-kdevops-series-b-nixos-qemu-v1-8-209154ae54f8@samsung.com>
From: Daniel Gomez <[email protected]>

scripts/nixos.Makefile's clean_nixos_cache target did
"rm -rf /xfs1/libvirt/kdevops/nixos/nixos-image-*", a
per-developer convention rather than a kdevops default. Users
whose storage pool lives elsewhere got no benefit from the line;
users whose pool did live under /xfs1/libvirt/kdevops/ got
redundant cleanup - destroy_nixos already runs the role's
destroy.yml, which removes the per-VM qcow2 files,
nixos-image-result, and extra-drives under the configured
nixos_storage_dir.

Drop the hardcoded line. The role owns the per-node storage
cleanup and knows the right path from kdevops configuration.

Generated-by: Claude AI
Signed-off-by: Daniel Gomez <[email protected]>
---
 scripts/nixos.Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/scripts/nixos.Makefile b/scripts/nixos.Makefile
index 44c606c2..18b4fca7 100644
--- a/scripts/nixos.Makefile
+++ b/scripts/nixos.Makefile
@@ -87,6 +87,5 @@ clean_nixos_cache: destroy_nixos
 	$(Q)sudo /nix/store/*/bin/nix-collect-garbage -d 2>/dev/null || \
 		sudo nix-collect-garbage -d 2>/dev/null || \
 		echo "Warning: Could not run nix garbage collection"
-	$(Q)rm -rf /xfs1/libvirt/kdevops/nixos/nixos-image-* 2>/dev/null || true
 	$(Q)echo "NixOS cache cleaned"
 PHONY += clean_nixos_cache

-- 
2.53.0