garbage collect cleans more stuff

You might want to remove the logging

Signed-off-by: Purin <118902463+Dylouwu@users.noreply.github.com>
This commit is contained in:
Purin
2025-08-25 15:24:00 +02:00
parent f70a139bd7
commit a07b0a38ac

View File

@@ -55,8 +55,17 @@ let
elif [[ $1 == "update" ]];then
cd ${configDirectory} && nix flake update
elif [[ $1 == "gc" ]];then
cd ${configDirectory} && sudo nix-collect-garbage -d
cd ${configDirectory} && nix-collect-garbage -d
echo "Starting Nix garbage collection..."
cd ${configDirectory} && \
echo "Cleaning up system garbage..." && \
sudo nix-collect-garbage -d && \
echo "Cleaning up user garbage..." && \
nix-collect-garbage -d && \
echo "Collecting garbage from Nix store..." && \
nix-store --gc && \
echo "Optimizing Nix store..." && \
nix-store --optimise
echo "Nix garbage collection complete."
elif [[ $1 == "cb" ]];then
sudo /run/current-system/bin/switch-to-configuration boot
elif [[ $1 == "listgen" ]];then