NixOS Generations Trimmer: Difference between revisions
imported>Nix Page to help with generations cleanup |
imported>Nix m fix defaults help |
||
| Line 139: | Line 139: | ||
Usage: | Usage: | ||
trim-generations.sh (defaults are: Keep-Gens= | trim-generations.sh (defaults are: Keep-Gens=10 Keep-Days=7 Profile=user) | ||
If you enter any parameters, you must enter all three. | If you enter any parameters, you must enter all three. | ||
| Line 161: | Line 161: | ||
## Defaults | ## Defaults | ||
keepGens= | keepGensDef=10; keepDaysDef=7 | ||
keepGens=$keepGensDef; keepDays=$keepDaysDef | |||
## Usage | ## Usage | ||
usage () { | usage () { | ||
printf "Usage:\n\t trim-generations.sh (defaults are: Keep-Gens=$ | printf "Usage:\n\t trim-generations.sh (defaults are: Keep-Gens=$keepGensDef Keep-Days=$keepDaysDef Profile=user)\n\n" | ||
printf "If you enter any parameters, you must enter all three.\n\n" | printf "If you enter any parameters, you must enter all three.\n\n" | ||
printf "Example:\n\t trim-generations.sh 15 10 home-manager\n" | printf "Example:\n\t trim-generations.sh 15 10 home-manager\n" | ||