From 0385692efc065ed15e2909e17661e6b451a4446b Mon Sep 17 00:00:00 2001 From: JakeGinesin Date: Tue, 29 Apr 2025 03:04:25 -0400 Subject: [PATCH] 30 current 2025-04-29 03:04:20 25.05.20250424.f771eb4 6.12.24 * --- home/scripts/rebuild.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/home/scripts/rebuild.sh b/home/scripts/rebuild.sh index c1c5e45..d738f6f 100644 --- a/home/scripts/rebuild.sh +++ b/home/scripts/rebuild.sh @@ -34,8 +34,10 @@ git status --porcelain echo "" echo "NixOS Rebuilding..." +prev=$(basename $(readlink /run/current-system) | sed 's/.*nixos-system-\(.*\)-.*$/\1/') + # Rebuild, output simplified errors, log trackebacks -sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix 2>&1 | tee /tmp/nixos-switch.log +sudo /run/current-system/sw/bin/nixos-rebuild switch --flake /home/synchronous/nix-cfg/flake.nix#"$prev" 2>&1 | tee /tmp/nixos-switch.log # cat /tmp/nixos-switch.log | grep --color error && exit 1