chore: update bootstrap flow to clone golden image and track v2 branch

This commit is contained in:
Tibo De Peuter 2026-08-05 19:47:12 +02:00
parent 41f5e6bae8
commit c35e0ed40e
Signed by: tdpeuter
SSH key fingerprint: SHA256:u/h/LVoqKF1Iz02uOyxe6hcjmoZASCGV2HM0TG9ZMoU
3 changed files with 7 additions and 10 deletions

View file

@ -59,12 +59,9 @@ resource "proxmox_virtual_environment_vm" "control_center" {
bridge = "vmbr0" bridge = "vmbr0"
} }
disk { clone {
datastore_id = "data" vm_id = 9000
file_id = "local:iso/nixos-minimal.iso" # TODO Replace with actual ISO or use Clone full = true
interface = "scsi0"
size = 20
file_format = "raw"
} }
# Cloud-Init for initial SSH access and SOPS age key injection # Cloud-Init for initial SSH access and SOPS age key injection

View file

@ -59,7 +59,7 @@ if [ -d "nix-config" ]; then
cd nix-config cd nix-config
git pull git pull
else else
git clone https://git.depeuter.dev/Bos55/nix-config.git git clone -b v2 https://git.depeuter.dev/Bos55/nix-config.git
cd nix-config cd nix-config
fi fi

View file

@ -16,10 +16,10 @@ fi
cd nix-config || exit cd nix-config || exit
git fetch origin main git fetch origin v2
LOCAL=$(git rev-parse HEAD) LOCAL=$(git rev-parse HEAD)
REMOTE=$(git rev-parse origin/main) REMOTE=$(git rev-parse origin/v2)
if [ "$LOCAL" = "$REMOTE" ]; then if [ "$LOCAL" = "$REMOTE" ]; then
echo "Already up to date. Nothing to do." echo "Already up to date. Nothing to do."
@ -27,7 +27,7 @@ if [ "$LOCAL" = "$REMOTE" ]; then
fi fi
echo "Changes detected. Updating from $LOCAL to $REMOTE..." echo "Changes detected. Updating from $LOCAL to $REMOTE..."
git reset --hard origin/main git reset --hard origin/v2
echo "Applying OpenTofu changes in $OPENTOFU_DIR..." echo "Applying OpenTofu changes in $OPENTOFU_DIR..."
cd "$OPENTOFU_DIR" || exit cd "$OPENTOFU_DIR" || exit