Source the setup form from the Omarchy runtime - #104
Merged
Conversation
The keyboard layout list, the account and hostname validation rules, and the gum prompts that ask for them existed here and again in the runtime's first-boot owner setup, with nothing keeping the copies honest. They had already drifted: dropping two layouts from this list moved English (US) from the top of one gum choose page to the bottom of the previous one, leaving the preselected default pinned under a screenful of layouts. The form now lives in the runtime at install/provisioning/setup-form.sh, and build-iso.sh vendors it out of the very runtime package this ISO bundles — the same two-branch machinery already used for omarchy-base.packages, so a --local-source build takes it from the mounted checkout and everything else extracts it from the downloaded package. An ISO therefore ships the form belonging to the runtime it installs. That file is extracted on its own rather than alongside the package lists: bsdtar exits non-zero for a member it cannot find, so bundling the request would abort the build under set -e with a bare "Not found in archive" instead of the actionable error about publishing a runtime that carries the form. Cancel handling is unified with first-boot setup, which is what made the prompts shareable. Every prompt reports 0 (answered), 1 (Esc), or 130 (Ctrl+C). Esc now unwinds to the start of the form instead of ending the install — it previously hit the same `|| abort` as Ctrl+C. Ctrl+C keeps both of its hidden affordances: arming deferred provisioning on the first keyboard screen, and toggling unencrypted on the disk screens. test_keyboard.py reads the layout list from a runtime checkout now, and skips its localectl coverage rather than failing when there is none to read. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR de-duplicates the installer’s interactive setup form (keyboard/account/hostname/timezone prompts and validation) by sourcing it from the Omarchy runtime, ensuring the ISO installer and the runtime’s first-boot owner setup stay byte-identical and can’t drift.
Changes:
- Configurator now sources a shared
setup-form.sh(vendored onto the ISO or read from a runtime checkout) and updates the flow so Esc means “back” across prompts. - ISO build now extracts and vendors
install/provisioning/setup-form.shfrom the runtime package (or local source), and hard-fails builds if it’s missing to avoid a prompt-less installer. - Tests and the QEMU harness are updated to reflect the new source of truth and the reordered keyboard layout list.
Reviewed changes
Copilot reviewed 4 out of 5 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
test/test_keyboard.py |
Reads supported keymaps from the shared setup-form (when available) instead of parsing the configurator script. |
configs/airootfs/usr/share/omarchy-iso/orchestrator/keyboard.py |
Updates docstring to reflect that unknown-layout guarding is for autoinstall input, not the interactive form list. |
configs/airootfs/root/configurator |
Sources the shared setup form and refactors keyboard/user steps to use shared prompt functions with unified cancel/back semantics. |
builder/build-iso.sh |
Vendors setup-form.sh from the bundled runtime package (or local checkout) and fails the build with an actionable error if missing. |
bin/omarchy-iso-test |
Adjusts keystrokes in the deferred first-boot driver to match the new keyboard list ordering. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
Comment on lines
+21
to
+25
| SETUP_FORM_CANDIDATES = ( | ||
| Path("/omarchy-source/install/provisioning/setup-form.sh"), | ||
| ROOT.parent / "omarchy/install/provisioning/setup-form.sh", | ||
| Path("/usr/share/omarchy/install/provisioning/setup-form.sh"), | ||
| ) |
Comment on lines
+174
to
+181
| if [[ ! -f $setup_form ]]; then | ||
| echo "ERROR: $OMARCHY_RUNTIME_PACKAGE does not ship install/provisioning/setup-form.sh" >&2 | ||
| echo " The configurator sources its prompts from that file, so this ISO" >&2 | ||
| echo " would boot into an installer with no questions to ask." >&2 | ||
| echo " Publish a runtime carrying the shared setup form, or build with" >&2 | ||
| echo " --local-source against a checkout that has it." >&2 | ||
| exit 1 | ||
| fi |
| omarchy_prompt_username || return $? | ||
| omarchy_prompt_password || return $? | ||
|
|
||
| # Hash the password using yescrypt |
dhh
added a commit
that referenced
this pull request
Aug 10, 2026
The build's missing-form error only ever described the published-package case, so a --local-source build against a checkout without the form told you to publish a runtime or pass --local-source — advice you had already taken. Branch on /omarchy-source and name the checkout instead. The password comment has claimed yescrypt since 880d8c5 swapped the command to `openssl passwd -6`, which is SHA-512 crypt. openssl passwd cannot produce yescrypt at all, so the comment, not the command, is what was wrong. Both spotted by Copilot's review on #104. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The keyboard layout list, the account and hostname validation rules, and the gum prompts that ask for them existed here and in the runtime's first-boot owner setup, with nothing keeping the copies honest.
They had already drifted. Dropping two layouts from this list in #98 moved English (US) from position 11 to 10, which — because
gum choosepaginates in--height-sized pages and jumps to the page holding--selected— moved the preselected default from the top of page 2 to the bottom of page 1, leaving it pinned beneath a screenful of layouts nobody scanning for "English (US)" reads.Where it lives now
The form moves to the runtime at
install/provisioning/setup-form.sh(basecamp/omarchy#6669), andbuild-iso.shvendors it out of the very runtime package this ISO bundles — the same two-branch machinery already used foromarchy-base.packages: mounted checkout under--local-source,bsdtarout of the downloaded package otherwise. So an ISO ships the form belonging to the runtime it installs, and the installer cannot offer a layout the installed system won't know.It's extracted on its own rather than alongside the package lists, because
bsdtarexits non-zero for a member it cannot find — bundling the request would abort the build underset -ewith a bareNot found in archiveinstead of the actionable error about publishing a runtime that carries the form. Caught by review.Esc now means back
Unifying cancel handling is what made the prompts shareable: the two sides were byte-identical apart from
|| aborthere versus|| continuethere. Esc and Ctrl+C are the only keys any gum widget exits on, and they carry distinct statuses, so every prompt reports0(answered),1(Esc — unwind to the start of the form), or130(Ctrl+C — a side channel each caller defines).Esc previously hit the same
|| abortas Ctrl+C, so it ended the install outright; there was no way back to an earlier answer. Ctrl+C keeps both of its hidden affordances untouched — arming deferred provisioning on the first keyboard screen, and toggling unencrypted on the disk screens.English (US) also leads the layout list now, ahead of the other English variants, so the default is the first thing on screen no matter how the list grows.
Do not merge until a runtime package carrying
setup-form.shis published. Until then every non-local build — including nightly — fails with:That is deliberate: an ISO built without the form would boot an installer with no prompts, which is worse than a failed build.
— 🤖 Claude, posting on behalf of @dhh