Full replacement of the previous iteration, rebuilt around three ideas:
- Pure evaluation: theme-state.json lives inside the flake and is read
via the nomarchy.stateFile option — no --impure, ever.
- All-Home-Manager theming: `nomarchy-theme-sync apply` writes the JSON
and runs `home-manager switch`; every theme change is one atomic,
rollbackable generation. Wallpaper (swww) is the sole runtime piece.
- Flat, downstream-first layout: modules/{nixos,home} with one
options.nix each, exported as nixosModules/homeModules + overlay +
flake template; system (nixos-rebuild) and desktop (home-manager
switch) rebuild paths are fully split.
Ships 21 themes imported from the previous iteration (palettes,
wallpapers, btop themes, six whole-swap Waybar identities), Stylix for
the GTK/Qt/cursor long tail, a live ISO target with offline theme
switching, and docs/TESTING.md with the QEMU verification workflow.
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
50 lines
1.7 KiB
Bash
Executable File
50 lines
1.7 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Build the Nomarchy live ISO and boot it in QEMU for a try-before-install
|
|
# run. Ported from the previous Nomarchy iteration. See docs/TESTING.md
|
|
# for what to verify once it's up.
|
|
|
|
set -e
|
|
cd "$(dirname "$0")/.."
|
|
|
|
echo "Building Nomarchy live ISO..."
|
|
nix build .#nixosConfigurations.nomarchy-live.config.system.build.isoImage
|
|
|
|
ISO=$(ls -1 result/iso/*.iso 2>/dev/null | head -n 1)
|
|
if [ -z "$ISO" ]; then
|
|
echo "Error: ISO build succeeded but no .iso file found in result/iso/" >&2
|
|
exit 1
|
|
fi
|
|
|
|
# Prefer UEFI with OVMF so the ISO boots the same way a modern install
|
|
# does; fall back to legacy BIOS if OVMF isn't available on this host.
|
|
OVMF_CANDIDATES=(
|
|
"/run/current-system/sw/share/OVMF/OVMF_CODE.fd"
|
|
"/run/current-system/sw/share/qemu/edk2-x86_64-code.fd"
|
|
"/nix/var/nix/profiles/system/sw/share/OVMF/OVMF_CODE.fd"
|
|
"/usr/share/OVMF/OVMF_CODE.fd"
|
|
)
|
|
BIOS_ARG=()
|
|
for c in "${OVMF_CANDIDATES[@]}"; do
|
|
if [ -f "$c" ]; then
|
|
BIOS_ARG=(-drive "if=pflash,format=raw,readonly=on,file=$c")
|
|
VARS="${c%_CODE.fd}_VARS.fd"
|
|
[ -f "$VARS" ] && BIOS_ARG+=(-drive "if=pflash,format=raw,readonly=on,file=$VARS")
|
|
break
|
|
fi
|
|
done
|
|
|
|
# KVM if the host supports it; software emulation otherwise (slow).
|
|
ACCEL_ARG=()
|
|
[ -r /dev/kvm ] && ACCEL_ARG=(-enable-kvm -cpu host)
|
|
|
|
echo "Launching ISO: $ISO"
|
|
# virtio-vga-gl + gl=on gives the guest real OpenGL — Hyprland and
|
|
# Ghostty need it; without GL the session may fail to start.
|
|
exec qemu-system-x86_64 \
|
|
"${ACCEL_ARG[@]}" \
|
|
-m 4096 -smp 2 \
|
|
"${BIOS_ARG[@]}" \
|
|
-device virtio-vga-gl -display gtk,gl=on \
|
|
-device virtio-net-pci,netdev=n0 -netdev user,id=n0 \
|
|
-cdrom "$ISO" -boot d
|