From caeb1c3891b65db7c837f10c87652d823495a8e4 Mon Sep 17 00:00:00 2001 From: Mohammed Esafi Date: Sun, 9 Nov 2025 02:12:24 +0100 Subject: [PATCH] feat: add Nix garbage collection to developer tools cleanup (#45) --- bin/clean.sh | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/bin/clean.sh b/bin/clean.sh index b4025f5..3cd48a8 100755 --- a/bin/clean.sh +++ b/bin/clean.sh @@ -693,6 +693,16 @@ perform_cleanup() { note_activity fi + # Nix package manager + if command -v nix-collect-garbage > /dev/null 2>&1; then + if [[ "$DRY_RUN" != "true" ]]; then + clean_tool_cache "Nix garbage collection" nix-collect-garbage -d + else + echo -e " ${YELLOW}→${NC} Nix garbage collection (would clean)" + fi + note_activity + fi + safe_clean ~/.gitconfig.lock "Git config lock" end_section