finalize rebuild script with log file

This commit is contained in:
2025-10-04 12:46:05 -05:00
parent 69d29e989e
commit 84e6050ad2
2 changed files with 2 additions and 1 deletions

1
.gitignore vendored
View File

@@ -1,5 +1,6 @@
.keyring
.keyring/
.nixos-switch-log
users/blake/dotfiles/zsh/zplug
users/blake/dotfiles/zsh/.zsh_history
users/blake/dotfiles/zsh/.zcompdump

View File

@@ -5,7 +5,7 @@ pushd ~/.nix
# alejandra . &>/dev/null
git diff -U0 *.nix
echo "nixos rebuilding..."
sudo nixos-rebuild switch --flake ~/.nix#snowbelle &>nixos-switch.log || (
sudo nixos-rebuild switch --flake ~/.nix#snowbelle &>.nixos-switch-log || (
cat nixos-switch.log | grep --color error && false)
gen=$(nixos-rebuild list-generations | grep current)
git commit -am "$gen"