#!/usr/bin/env bash

# Build and run the Nomarchy Installer VM for testing.

echo "Building Nomarchy Installer VM..."
nix build .#nixosConfigurations.installerVm.config.system.build.vm

if [ $? -eq 0 ]; then
    echo "Success! Launching Installer VM..."
    ./result/bin/run-nomarchy-installer-vm
else
    echo "Error: VM build failed."
    exit 1
fi
