nix-config/scripts/apply-host-layer.sh

19 lines
565 B
Bash
Executable file

#!/usr/bin/env bash
set -euo pipefail
# This script runs the host-layer OpenTofu configuration using a Docker container,
# keeping your laptop and the Proxmox node clean of dependencies.
echo "Running OpenTofu for host-layer..."
docker run --rm -it \
-v "$(pwd)":/workspace \
-w /workspace/opentofu/host-layer \
-v "$HOME/.ssh:/root/.ssh:ro" \
ghcr.io/opentofu/opentofu:latest init -upgrade
docker run --rm -it \
-v "$(pwd)":/workspace \
-w /workspace/opentofu/host-layer \
-v "$HOME/.ssh:/root/.ssh:ro" \
ghcr.io/opentofu/opentofu:latest apply