about summary refs log tree commit diff
path: root/rebuild.sh
diff options
context:
space:
mode:
Diffstat (limited to 'rebuild.sh')
-rwxr-xr-xrebuild.sh4
1 files changed, 2 insertions, 2 deletions
diff --git a/rebuild.sh b/rebuild.sh
index fe0b725..c38145e 100755
--- a/rebuild.sh
+++ b/rebuild.sh
@@ -13,7 +13,7 @@ DIR=$HOME/nixos
 
 
 # A rebuild script that commits on a successful build
-set -e
+set -e pipefail
 
 # cd to your config dir
 pushd $DIR
@@ -35,7 +35,7 @@ git diff -U0 '*'
 echo "NixOS Rebuilding..."
 
 # Rebuild, output simplified errors, log trackebacks
-(sudo nixos-rebuild switch --flake $DIR 2>&1 | tee nixos-switch.log) || exit 2 
+sudo nixos-rebuild switch --flake $DIR 2>&1 | tee nixos-switch.log
 
 # Get current generation metadata
 current=$(nixos-rebuild list-generations | grep current)