Update the rebuild command to be more elegant
This commit is contained in:
parent
0b36d9f978
commit
a2126338f5
|
@ -12,16 +12,8 @@ writeShellApplication
|
|||
text = ''
|
||||
# A rebuild script for NixOS
|
||||
set -e
|
||||
pushd /tmp > /dev/null
|
||||
rm -rf ./rebuild
|
||||
systemd-inhibit --what=idle git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
|
||||
pushd ./rebuild > /dev/null
|
||||
echo "NixOS Rebuilding..."
|
||||
systemd-inhibit --what=idle sudo nixos-rebuild switch --flake .#
|
||||
popd > /dev/null
|
||||
echo "Cleaning up repository in '/tmp/rebuild'..."
|
||||
systemd-inhibit --what=idle rm -rf ./rebuild
|
||||
popd > /dev/null
|
||||
sudo systemd-inhibit nixos-rebuild switch --flake git+https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git#
|
||||
echo "NixOS Rebuilt OK!"
|
||||
'';
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue