dot_testing/builds/rebuild/rebuild

14 lines
283 B
Plaintext
Raw Normal View History

#!/bin/sh
2023-08-13 20:13:48 -05:00
cd ~/dot_testing
if [ -f "boxes/$(hostname)/custom_command" ]; then
eval "$(cat boxes/$(hostname)/custom_command)"
exit
fi
2024-01-15 03:52:45 -06:00
if [ -f "flake.nix" ]; then
sudo nixos-rebuild --flake . switch $@
else
sudo nixos-rebuild -I nixos-config=./boxes/$(hostname).nix switch $@
fi