Nix : Add cleanup.

This commit is contained in:
Dmitry Voronin 2024-01-24 19:42:52 +03:00
parent 16707bf167
commit 3ba1083d28

View file

@ -37,3 +37,9 @@ function nix_update() {
function nix_upgrade() {
nixos-rebuild switch --upgrade
}
# Free up root space.
function nix_clean() {
nix-collect-garbage -d
[[ "${UID}" = 0 ]] && nix-store --gc
}