nixfiles/scripts/deploy/hetzner-arm.sh

17 lines
651 B
Bash
Raw Normal View History

#!/usr/bin/env bash
SCRIPT_DIR=$( cd -- "$( dirname -- "${BASH_SOURCE[0]}" )" &> /dev/null && pwd )
cd $SCRIPT_DIR
cd $(git rev-parse --show-toplevel)
DEFAULT_HOST="root@hetzner-arm.servers.genderfucked.monster"
TARGET_HOST=${HOST:-${DEFAULT_HOST}}
2025-01-27 18:10:01 +00:00
if command -v nom &> /dev/null; then
nixos-rebuild switch --flake .#hetzner-arm --target-host "$TARGET_HOST" --no-build-nix --fast --use-substitutes -s --keep-failed --log-format internal-json -v |& nom --json
else
echo "Install nix-output-monitor for better output"
nixos-rebuild switch --flake .#hetzner-arm --target-host "$TARGET_HOST" --no-build-nix --fast --use-substitutes -s "$@"
fi