noisebell/scripts/deploy-do

16 lines
324 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
target=${1:-jet@noisebell-do}
if [ "$#" -gt 0 ]; then
shift
fi
SCRIPT_DIR=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
REPO_ROOT=$(cd -- "$SCRIPT_DIR/.." && pwd)
exec nixos-rebuild switch \
--flake "$REPO_ROOT#noisebell-do" \
--target-host "$target" \
--sudo \
"$@"