feat(packages/rebuild): add quick mode to skip commit and reboot prompts
This commit is contained in:
parent
8ea093d939
commit
9de4ef0ce6
1 changed files with 10 additions and 2 deletions
|
@ -19,6 +19,7 @@ pkgs.writeShellScriptBin "rebuild" # sh
|
||||||
fi
|
fi
|
||||||
#TODO: get hostnames from flake nixosConfigurations
|
#TODO: get hostnames from flake nixosConfigurations
|
||||||
|
|
||||||
|
QUICK=false
|
||||||
NO_GENERATION_CHECK=false
|
NO_GENERATION_CHECK=false
|
||||||
TEST_SHELL=false
|
TEST_SHELL=false
|
||||||
REMOTE_HOSTS=()
|
REMOTE_HOSTS=()
|
||||||
|
@ -29,6 +30,10 @@ pkgs.writeShellScriptBin "rebuild" # sh
|
||||||
|
|
||||||
while [[ $# -gt 0 ]]; do
|
while [[ $# -gt 0 ]]; do
|
||||||
case "$1" in
|
case "$1" in
|
||||||
|
--quick | -q)
|
||||||
|
QUICK=true
|
||||||
|
shift
|
||||||
|
;;
|
||||||
--no-generation-check | -n)
|
--no-generation-check | -n)
|
||||||
NO_GENERATION_CHECK=true
|
NO_GENERATION_CHECK=true
|
||||||
shift
|
shift
|
||||||
|
@ -101,7 +106,10 @@ pkgs.writeShellScriptBin "rebuild" # sh
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
|
|
||||||
prompt "Commit changes" commit
|
if "$QUICK"; then
|
||||||
prompt "Reboot system" sudo systemctl reboot
|
prompt "Commit changes" commit
|
||||||
|
prompt "Reboot system" sudo systemctl reboot
|
||||||
|
fi
|
||||||
|
|
||||||
exit 0
|
exit 0
|
||||||
''
|
''
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue