nixos-rebuild: avoid rebuilding nix / reexecuting nixos-rebuild for list-generations

This commit is contained in:
éclairevoyant 2024-04-23 15:02:18 -04:00
parent 71b4a60386
commit 2680b60c30
No known key found for this signature in database
GPG Key ID: E3813AEAA02DB54B
1 changed files with 4 additions and 0 deletions

View File

@ -50,6 +50,10 @@ while [ "$#" -gt 0 ]; do
;;
switch|boot|test|build|edit|repl|dry-build|dry-run|dry-activate|build-vm|build-vm-with-bootloader|list-generations)
if [ "$i" = dry-run ]; then i=dry-build; fi
if [ "$i" = list-generations ]; then
buildNix=
fast=1
fi
# exactly one action mandatory, bail out if multiple are given
if [ -n "$action" ]; then showSyntax; fi
action="$i"