about summary refs log tree commit diff
diff options
context:
space:
mode:
authorPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2024-09-29 18:48:37 +0200
committerPatryk Niedźwiedziński <pniedzwiedzinski19@gmail.com>2024-09-29 18:48:37 +0200
commit5b66d7bc26ed623355fadd531ac77d5c91fa2010 (patch)
tree20b1c1faf5f3e844dd713c56adf02ff8cd17f636
parente99a1a5f1c0d53039e1be6fb02bed871fb5e0717 (diff)
downloaddots-5b66d7bc26ed623355fadd531ac77d5c91fa2010.tar.gz
dots-5b66d7bc26ed623355fadd531ac77d5c91fa2010.zip
t14: 25 current 2024-09-29 18:48:34 24.05.20240928.fbca5e7 6.6.52 *
-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)