diff --git a/justfile b/justfile index 76c871e..41c2170 100644 --- a/justfile +++ b/justfile @@ -1,20 +1,40 @@ default: help # Build the 13-inch-thin-cannon install ISO (disko-backed, hardened) -iso: +build: nix build .#nixosConfigurations."13-inch-thin-cannon-iso".config.system.build.isoImage +# Alias for build +iso: build + # Copy OVMF firmware into the tests dir (result/iso and result/FV cannot coexist) ovmf: + chmod -R u+w 13-inch-thin-cannon/tests/ovmf 2>/dev/null || true + rm -rf 13-inch-thin-cannon/tests/ovmf mkdir -p 13-inch-thin-cannon/tests/ovmf - cp -a $$(nix build .#ovmf --no-link --print-out-paths)/FV 13-inch-thin-cannon/tests/ovmf/ + cp -a $(nix build .#ovmf --no-link --print-out-paths)/FV 13-inch-thin-cannon/tests/ovmf/ + +# Full lifecycle: build the ISO, then test it +up: build test-iso # Boot the generated ISO in QEMU (OVMF UEFI) and verify it test-iso: ovmf ./13-inch-thin-cannon/tests/iso-test.sh -# Full lifecycle: build the ISO, then test it -up: iso test-iso +# Run a single phase: live | install | boot +live: ovmf + ./13-inch-thin-cannon/tests/iso-test.sh live + +install: ovmf + ./13-inch-thin-cannon/tests/iso-test.sh install + +boot: ovmf + ./13-inch-thin-cannon/tests/iso-test.sh boot + +# Debug: boot the installed system interactively (asks you to type the LUKS +# passphrase on the serial console; monitor on port 5555, serial on 5557) +debug: ovmf + INTERACTIVE=1 ./13-inch-thin-cannon/tests/iso-test.sh boot # Show available targets help: