From c35e0ed40eb73f4ba5624facdb330997ca3440a7 Mon Sep 17 00:00:00 2001 From: Tibo De Peuter Date: Wed, 5 Aug 2026 19:47:12 +0200 Subject: [PATCH] chore: update bootstrap flow to clone golden image and track v2 branch --- opentofu/nodes/mikoshi/main.tf | 9 +++------ scripts/bootstrap.sh | 2 +- scripts/hypervisor-sync.sh | 6 +++--- 3 files changed, 7 insertions(+), 10 deletions(-) diff --git a/opentofu/nodes/mikoshi/main.tf b/opentofu/nodes/mikoshi/main.tf index 93dee38..7e7a512 100644 --- a/opentofu/nodes/mikoshi/main.tf +++ b/opentofu/nodes/mikoshi/main.tf @@ -59,12 +59,9 @@ resource "proxmox_virtual_environment_vm" "control_center" { bridge = "vmbr0" } - disk { - datastore_id = "data" - file_id = "local:iso/nixos-minimal.iso" # TODO Replace with actual ISO or use Clone - interface = "scsi0" - size = 20 - file_format = "raw" + clone { + vm_id = 9000 + full = true } # Cloud-Init for initial SSH access and SOPS age key injection diff --git a/scripts/bootstrap.sh b/scripts/bootstrap.sh index d74a978..dcca622 100644 --- a/scripts/bootstrap.sh +++ b/scripts/bootstrap.sh @@ -59,7 +59,7 @@ if [ -d "nix-config" ]; then cd nix-config git pull 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 fi diff --git a/scripts/hypervisor-sync.sh b/scripts/hypervisor-sync.sh index 1a5536b..dba7a6a 100644 --- a/scripts/hypervisor-sync.sh +++ b/scripts/hypervisor-sync.sh @@ -16,10 +16,10 @@ fi cd nix-config || exit -git fetch origin main +git fetch origin v2 LOCAL=$(git rev-parse HEAD) -REMOTE=$(git rev-parse origin/main) +REMOTE=$(git rev-parse origin/v2) if [ "$LOCAL" = "$REMOTE" ]; then echo "Already up to date. Nothing to do." @@ -27,7 +27,7 @@ if [ "$LOCAL" = "$REMOTE" ]; then fi 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..." cd "$OPENTOFU_DIR" || exit