finalize rebuild script with log file
This commit is contained in:
1
.gitignore
vendored
1
.gitignore
vendored
@@ -1,5 +1,6 @@
|
|||||||
.keyring
|
.keyring
|
||||||
.keyring/
|
.keyring/
|
||||||
|
.nixos-switch-log
|
||||||
users/blake/dotfiles/zsh/zplug
|
users/blake/dotfiles/zsh/zplug
|
||||||
users/blake/dotfiles/zsh/.zsh_history
|
users/blake/dotfiles/zsh/.zsh_history
|
||||||
users/blake/dotfiles/zsh/.zcompdump
|
users/blake/dotfiles/zsh/.zcompdump
|
||||||
|
|||||||
@@ -5,7 +5,7 @@ pushd ~/.nix
|
|||||||
# alejandra . &>/dev/null
|
# alejandra . &>/dev/null
|
||||||
git diff -U0 *.nix
|
git diff -U0 *.nix
|
||||||
echo "nixos rebuilding..."
|
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)
|
cat nixos-switch.log | grep --color error && false)
|
||||||
gen=$(nixos-rebuild list-generations | grep current)
|
gen=$(nixos-rebuild list-generations | grep current)
|
||||||
git commit -am "$gen"
|
git commit -am "$gen"
|
||||||
|
|||||||
Reference in New Issue
Block a user