dot_testing/builds/rebuild/rebuild
stupidcomputer 90e4234f2a add custom_command support to rebuild
since `netbox` has some weird requirements, add a custom_command option
for `rebuild`.
2024-07-22 14:21:02 -05:00

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