1 files changed, 5 insertions, 4 deletions
diff --git a/build.sh b/build.sh
index 4b4cfa5..f366fe5 100755
--- a/build.sh
+++ b/build.sh
@@ -16,12 +16,13 @@ EXTRA_NIX_FLAGS="-L --accept-flake-config --keep-going"
EXTRA_NIXOS_REBUILD_FLAGS="--sudo --no-reexec --offline" # legacy: --use-remote-sudo --fast
if [ "${ROOT}" = "/" ]; then
- [ -f "host/${CONFIG}/hooks/pre-rebuild.sh" ] && host/${CONFIG}/hooks/pre-rebuild.sh
- [ ! -f "hardware-configuration.nix" ] && nixos-generate-config --show-hardware-config > hardware-configuration.nix
+ [ -f "host/${CONFIG}/hooks/pre-rebuild.sh" ] && echo "<=== RUNNING PRE-REBUILD HOOK AT host/${CONFIG}/hooks/pre-rebuild.sh ===>" && host/${CONFIG}/hooks/pre-rebuild.sh
+ [ ! -f "hardware-configuration.nix" ] && echo "<=== GENERATING NEW HARDWARE CONFIG ===>" && nixos-generate-config --show-hardware-config > hardware-configuration.nix
git add -f hardware-configuration.nix
- nom build $DERIVATION $EXTRA_NIX_FLAGS && nixos-rebuild switch --flake .#${CONFIG} $EXTRA_NIX_FLAGS $EXTRA_NIXOS_REBUILD_FLAGS || exit 1
+ echo "<=== REBUILDING NIXOS CONFIGURATION FOR ${CONFIG} ===>"
+ nom build $DERIVATION $EXTRA_NIX_FLAGS && echo "<=== SWITCHING TO NEW CONFIGURATION ===>" && nixos-rebuild switch --flake .#${CONFIG} $EXTRA_NIX_FLAGS $EXTRA_NIXOS_REBUILD_FLAGS || exit 1
#nixos-rebuild switch --flake ".#${CONFIG}" -j`nproc` --upgrade-all -L || exit 1
- [ -f "host/${CONFIG}/hooks/post-rebuild.sh" ] && host/${CONFIG}/hooks/post-rebuild.sh
+ [ -f "host/${CONFIG}/hooks/post-rebuild.sh" ] && echo "<=== RUNNING POST-REBUILD HOOK AT host/${CONFIG}/hooks/post-rebuild.sh ===>" && host/${CONFIG}/hooks/post-rebuild.sh
git rm --cached hardware-configuration.nix
exit
else
|