#!/usr/bin/env bash # Shared config for scripts/*.sh. Source this instead of hardcoding a # second copy of these values in every script: # source "$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)/env.sh" # Every variable can still be overridden per-invocation via the # environment (e.g. PROXMOX_STORAGE=tank-nvme ./scripts/create-proxmox-resource.sh ...) # since each one only sets a default if unset. # SSH-reachable Proxmox node that scripts/create-proxmox-resource.sh runs # pct/qm on. Matches the Proxmox web UI hostname already used in # hosts/nixos/home.nix's desktop shortcuts (pve. from # variables.nix) -- change this if that's not actually reachable over SSH, # or if you're targeting a different node in a multi-node cluster. : "${PROXMOX_HOST:=pve.sweet.home}" : "${PROXMOX_SSH_USER:=root}" # Storage pool names -- Proxmox's own stock-install defaults, but this # varies a lot by setup (ZFS pool name, custom LVM-thin volume, etc.). # Verify with `pvesm status` on the node and correct these if wrong. : "${PROXMOX_STORAGE:=local-lvm}" # VM disks / CT rootfs : "${PROXMOX_ISO_STORAGE:=local}" # uploaded images/ISOs/CT templates : "${PROXMOX_BRIDGE:=vmbr0}" # Fallback resource sizing when a script doesn't get --cores/--memory. : "${PROXMOX_DEFAULT_CORES:=2}" : "${PROXMOX_DEFAULT_MEMORY_MB:=2048}" export PROXMOX_HOST PROXMOX_SSH_USER PROXMOX_STORAGE PROXMOX_ISO_STORAGE \ PROXMOX_BRIDGE PROXMOX_DEFAULT_CORES PROXMOX_DEFAULT_MEMORY_MB