Files
homelab/build-ova.sh
T
erikandClaude Opus 4.8 062a631edf feat: samba password provisioning + caddy reverse proxy; rename user to darman
- systemd oneshot sets SMB password after samba-smbd (activation ran too early)
- caddy vhost reverse_proxy to whoami so :80 actually serves
- vm.nix: throwaway SMB secret for testing; real host uses sops/agenix

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-11 19:02:13 +02:00

26 lines
743 B
Bash
Executable File

#!/usr/bin/env bash
# Build the VirtualBox OVA inside a throwaway nixos/nix container.
# No nix needed on the host. Output: ./jupiter.ova
set -euo pipefail
REPO="$(cd "$(dirname "$0")" && pwd)"
docker run --rm \
--device /dev/kvm \
--group-add "$(getent group kvm | cut -d: -f3)" \
-v "$REPO":/work -w /work \
nixos/nix \
bash -c '
set -euo pipefail
git config --global --add safe.directory /work
nix build \
--extra-experimental-features "nix-command flakes" \
.#nixosConfigurations.jupiter-vbox.config.system.build.virtualBoxOVA \
-o /tmp/result
cp -L /tmp/result/*.ova /work/jupiter.ova
chown '"$(id -u):$(id -g)"' /work/jupiter.ova
echo "BUILD_DONE"
'
echo "OVA: $REPO/jupiter.ova"