Optimize updates and cleanups

Ensure old entries are deleted to free up disk space and inodes.
Ensure to optimize in the end, in order to free up disk space and
inodes.
This commit is contained in:
Daniel Siepmann 2024-05-27 22:21:07 +02:00
parent fac58895ab
commit bb4c0753f1
Signed by: Daniel Siepmann
GPG key ID: 33D6629915560EF4
2 changed files with 4 additions and 0 deletions

View file

@ -11,6 +11,8 @@ writeShellApplication {
nvd diff "/nix/var/nix/profiles/$oldVersion" "/nix/var/nix/profiles/system"
sudo nix-env -p /nix/var/nix/profiles/system --delete-generations +3
nix-collect-garbage --delete-older-than 60d
nix store gc
nix store optimize
'';
}

View file

@ -13,6 +13,8 @@ writeShellApplication {
home-manager expire-generations '-12 days'
nix-env --delete-generations +3
nix-collect-garbage --delete-older-than 60d
nix store gc
nix store optimize
'';
}