stupidcomputer
90e4234f2a
since `netbox` has some weird requirements, add a custom_command option for `rebuild`.
14 lines
283 B
Bash
Executable File
14 lines
283 B
Bash
Executable File
#!/bin/sh
|
|
|
|
cd ~/dot_testing
|
|
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
|