Let's try only absolute paths then

This commit is contained in:
Lillian Violet 2024-03-01 15:36:38 +01:00
parent 81b88d4d05
commit 1878f7b449

View file

@ -11,15 +11,12 @@ writeShellApplication
text = ''
# A rebuild script for NixOS for use of the systemd service
cd /tmp
rm -rf ./rebuild
systemd-inhibit git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git ./rebuild
cd ./rebuild
echo "NixOS Rebuilding..."
systemd-inhibit nixos-rebuild switch --flake .#
echo "Cleaning up repository in '/tmp/rebuild'..."
cd ..
systemd-inhibit rm -rf ./rebuild
echo "NixOS Rebuilt OK!"
systemd-inhibit rm -rf /tmp/rebuild
systemd-inhibit git clone https://git.lillianviolet.dev/Lillian-Violet/NixOS-Config.git /tmp/rebuild
systemd-inhibit echo "NixOS Rebuilding..."
systemd-inhibit nixos-rebuild switch --flake /tmp/rebuild/#
systemd-inhibit echo "Cleaning up repository in '/tmp/rebuild'..."
systemd-inhibit rm -rf /tmp/rebuild
systemd-inhibit echo "NixOS Rebuilt OK!"
'';
}