more expressive

This commit is contained in:
Ranomier 2025-01-08 16:14:42 +01:00
parent 07c1c0f9c8
commit 5ee1c7eddb

View file

@ -41,12 +41,15 @@ if ! [[ "${YESNO,,}" == "y" ]]; then
exit_with_new_shell exit_with_new_shell
fi fi
printf ">>> Add everything to git staging so nix can find it\n"
git add "$GIT_PATTERN" git add "$GIT_PATTERN"
printf ">>> Rebuilding NixOS\n" printf ">>> Rebuilding NixOS\n"
sudo nixos-rebuild switch | tee nixos-switch.log || ( sudo nixos-rebuild switch | tee nixos-switch.log || (
grep --color error nixos-switch.log && false) grep --color error nixos-switch.log && false)
gen=$(nixos-rebuild list-generations | grep current) gen=$(nixos-rebuild list-generations | grep current)
printf ">>> commiting to git\n"
git commit -am "$gen" git commit -am "$gen"
exit_with_new_shell exit_with_new_shell