gc subcommand should clean home-manager too!

This commit is contained in:
Emmet 2023-09-02 06:43:07 -05:00
parent b4f165c140
commit 45799e2108

View file

@ -194,10 +194,13 @@ let
elif [ "$1" = "gc" ]; then
if [ "$2" = "full" ]; then
sudo nix-collect-garbage --delete-old;
nix-collect-garbage --delete-old;
elif [ "$2" ]; then
sudo nix-collect-garbage --delete-older-than $2;
nix-collect-garbage --delete-older-than $2;
else
sudo nix-collect-garbage --delete-older-than 30d;
nix-collect-garbage --delete-older-than 30d;
fi
fi
'';