diff --git a/home/packages/custom/update-system/default.nix b/home/packages/custom/update-system/default.nix index a726135..86e0eb2 100644 --- a/home/packages/custom/update-system/default.nix +++ b/home/packages/custom/update-system/default.nix @@ -3,14 +3,14 @@ writeShellApplication { name = "custom-update-system"; - # Including this doesn't work - # oldVersion=$(home-manager generations | head -n 2 | tail -n 1 | cut -d' ' -f 7) - # newVersion=$(home-manager generations | head -n 1 | cut -d' ' -f 7) - # nvd diff "$oldVersion" "$newVersion" - text = '' nix-channel --update home-manager switch + + oldVersion=$(home-manager generations | head -n 2 | tail -n 1 | cut -d' ' -f 7) + newVersion=$(home-manager generations | head -n 1 | cut -d' ' -f 7) + nvd diff "$oldVersion" "$newVersion" + home-manager expire-generations '-30 days' nix-env --delete-generations +5 nix store gc