diff --git a/Justfile b/Justfile index e55d737..7783df3 100755 --- a/Justfile +++ b/Justfile @@ -50,7 +50,8 @@ rebuild-this-device rebuildarg="dry-activate": echo System rebuild successful else cat ${SYSREBUILD_LOG} - echo System rebuild failed + echo ERROR: system rebuild failed + exit 1 fi if type home-manager > /dev/null 2>&1; then @@ -60,7 +61,8 @@ rebuild-this-device rebuildarg="dry-activate": echo Home rebuild successful else cat ${HOMEREBUILD_LOG} - echo Home rebuild failed + echo ERROR: home rebuild failed + exit 1 fi fi @@ -71,7 +73,7 @@ rebuild-this-device rebuildarg="dry-activate": # Update the channel versions and (by default) switch to new environment update-this-device rebuild-mode='switch': #!/usr/bin/env bash - set -xe + set -e template=nix/os/devices/$(hostname -s)/versions.tmpl.nix outfile=nix/os/devices/$(hostname -s)/versions.nix @@ -89,12 +91,14 @@ update-this-device rebuild-mode='switch': exit 1 } - git commit -v ${outfile} -m "nix/os/devices/$(hostname -s): bump versions" - just -v rebuild-this-device {{rebuild-mode}} || { - echo WARNING: Rebuilding in {{rebuild-mode}}-mode failed + echo ERROR: Rebuilding in {{rebuild-mode}}-mode failed + git checkout ${outfile} + exit 1 } + git commit -v ${outfile} -m "nix/os/devices/$(hostname -s): bump versions" + # Iterate on a qtile config by running it inside Xephyr. (un-/grab the mouse with Ctrl + Shift-L) hm-iterate-qtile: #!/usr/bin/env bash