1
0
Fork 0
server-configuration/targets/vpn/deploy.sh

15 lines
346 B
Bash
Executable file

#!/usr/bin/env bash
set -euxo pipefail
nixBuild() {
if command -v nom -v &>/dev/null; then
nom build "$@"
else
nix build "$@"
fi
}
nixBuild .#nixosConfigurations.vpn.config.system.build.toplevel -L
if ! nixos-rebuild switch --flake .#vpn --target-host root@vpn; then
nixos-rebuild switch --flake .#vpn --target-host root@vpn
fi