simpler rebuild.sh

This commit is contained in:
joy 2024-08-21 22:35:01 +02:00
parent 8566c48f47
commit 7a883028dc

View file

@ -3,9 +3,7 @@
hostname=$(hostname) hostname=$(hostname)
if [[ $hostname == *"desktop"* ]]; then if [[ $hostname == *"desktop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#desktop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false) sudo nixos-rebuild switch --flake ~/nix/#desktop
rm nixos-switch.log
elif [[ $hostname == *"laptop"* ]]; then elif [[ $hostname == *"laptop"* ]]; then
sudo nixos-rebuild switch --flake ~/nix/#laptop &>nixos-switch.log || (cat nixos-switch.log | grep --color error && false) sudo nixos-rebuild switch --flake ~/nix/#laptop
rm nixos-switch.log
fi fi