feat: justfile - gc

This commit is contained in:
Ryan Yin
2024-08-12 18:30:26 +08:00
parent 41af2c1444
commit 4bb53d0190
+2 -6
View File
@@ -53,13 +53,9 @@ clean:
# Garbage collect all unused nix store entries # Garbage collect all unused nix store entries
[group('nix')] [group('nix')]
gc: gc:
# garbage collect all unused nix store entries # garbage collect all unused nix store entries(system-wide)
# NOTE: it's a system-wide garbage collection, but it seems won't affect home-manager's gcroot on darwin
sudo nix-collect-garbage --delete-older-than 7d sudo nix-collect-garbage --delete-older-than 7d
# garbage collect all unused nix store entries(for the user - home-manager)
[group('nix')]
gc-home:
# garbage collect all unused nix store entries(for the user - home-manager on nix-darwin)
# https://github.com/LnL7/nix-darwin/issues/237 # https://github.com/LnL7/nix-darwin/issues/237
nix-collect-garbage --delete-older-than 7d nix-collect-garbage --delete-older-than 7d