mirror of
https://github.com/DictXiong/dotfiles.git
synced 2025-11-26 09:47:49 +08:00
fix(zshrc): bnd exit when build error
This commit is contained in:
parent
8865dee1e9
commit
8dbb310e02
2
.zshrc2
2
.zshrc2
@ -137,7 +137,7 @@ sagt() { eval "$($DOTFILES/tools/sagent.sh $@)" ; }
|
||||
use() { nix --experimental-features nix-command --extra-experimental-features flakes shell "${(*)@/#%(#b)([^#]#)/nixpkgs#$match}" ; }
|
||||
bnd() {
|
||||
if [[ -n "$1" && -d "./hosts/$1" ]]; then
|
||||
nixos-rebuild --flake .#$1 build
|
||||
nixos-rebuild --flake .#$1 build || return $?
|
||||
nix-diff /opt/NixOS-Config/results/hosts/$1 ./result --color=always | less
|
||||
else
|
||||
echo host $1 does not exist
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user