21 lines
391 B
Bash
Executable File
21 lines
391 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd ~/dot_testing
|
|
if [ "$(hostname)" = "localhost" ]; then
|
|
# we're on a phone
|
|
cd boxes/phone/out-of-tree
|
|
make $@
|
|
exit
|
|
fi
|
|
|
|
if [ -f "boxes/$(hostname)/custom_command" ]; then
|
|
eval "$(cat boxes/$(hostname)/custom_command)"
|
|
exit
|
|
fi
|
|
|
|
if [ -f "flake.nix" ]; then
|
|
sudo nixos-rebuild --flake . switch $@
|
|
else
|
|
sudo nixos-rebuild -I nixos-config=./boxes/$(hostname).nix switch $@
|
|
fi
|