16 lines
293 B
Bash
Executable File
16 lines
293 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
if [ "${1:-}" = "" ] || [ "${2:-}" = "" ]; then
|
|
echo "Usage: scripts/rebuild-vps.sh <host> <flake-path>" >&2
|
|
exit 1
|
|
fi
|
|
|
|
host="$1"
|
|
flake_path="$2"
|
|
|
|
nixos-rebuild switch \
|
|
--flake "${flake_path}#vps" \
|
|
--target-host "${host}" \
|
|
--use-remote-sudo
|