improve rebuild script

This commit is contained in:
chaos 2023-09-20 19:05:44 +01:00
parent 73cd331583
commit b82f229a6b
No known key found for this signature in database

View file

@ -10,5 +10,13 @@ sudo ${BASH_SOURCE[0]} $@
exit
fi
MODE=${1-}
if [ -z "${MODE}" ]; then
MODE=switch
else
shift
fi
sudo cpupower frequency-set -g performance
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" switch $@
nixos-rebuild --flake "${REPO_ROOT}#$(hostname)" "$MODE" "$@"