#!/usr/bin/env bash
set -e

# Build the Nomarchy Installer ISO declaratively using the flake.

echo "Building Nomarchy Installer ISO..."
nix build .#nixosConfigurations.nomarchy-installer.config.system.build.isoImage

ISO_PATH=$(readlink -f result/iso/*.iso)
echo "Success! ISO built at: $ISO_PATH"
echo "You can now burn this to a USB drive using 'dd' or 'etcher'."
