Repository navigation
feat(distro): the omarchy unattended-install answer format - #485
Conversation
The omarchy distro entity gained everything an ISO install needs except
the answers themselves. This is the installer: block — eight files with
`when:` guards, rendered by sdk's RenderInstallerSeed onto a cidata
volume.
The split it implements: the DISTRO owns the format (which files, what
names, what syntax) and the VM ENTITY owns the data (this user, this
disk, these keys). Nothing in plugin-vm knows what archinstall is.
Every file, key and value was READ OFF the shipping omarchy-4.0.1.iso's
own configurator and then VERIFIED by a real unattended install: a
QEMU/OVMF run that installed with nobody at the keyboard, rebooted
itself, and let SSH in using only the seeded authorized_keys. It is not
reconstructed from the 3.x documentation, which differs — `users`, not
`!users`, is one place that matters.
The `when:` guards are what let ONE vocabulary express the whole
optional matrix with no Go branch anywhere:
- defer-provisioning REPLACES user_credentials.json (the imaging-rig
mode); shipping both would create the very account deferral exists
to avoid
- user_encrypt_installation.txt and the inlined disk_encryption block
appear together, only when encrypting
- the two git-identity .txt files, authorized_keys and
tailscale_authkey appear only when their data was given
authorized_keys is worth more than it looks: it seeds the account's
keys, ENABLES sshd, and OPENS the firewall port. A stock Omarchy install
ships openssh with the service disabled and the port closed, so without
this file the guest is unreachable no matter what keys exist.
One defect found by rendering rather than reading. The first version of
that template used a `{{- end}}` trim to drop a trailing blank line.
With ONE key it looked right; with TWO it concatenated them onto one
line — which sshd reads as a single malformed key and rejects BOTH. Now
`|-` (YAML strip chomp), which is correct for any count. The comment in
the file says so, because the single-key case looks fine either way and
the next person will be tempted by the same trim.
Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
Review — PASSHead SHA: Security screen: PASS — config-only addition to Checklist: All applicable rules PASS or NA.
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
The omarchy distro entity gained everything an ISO install needs except
the answers. This is the installer: block — eight files with `when:`
guards, rendered by sdk's RenderInstallerSeed onto a cidata volume.
The split it implements: the DISTRO owns the format (which files, what
names, what syntax) and the VM ENTITY owns the data. Nothing in
plugin-vm knows what archinstall is.
user_configuration.json is a FIELD-FOR-FIELD port of the ISO's own
`configurator`, read out of the shipping omarchy-4.0.1.iso's squashfs at
/root/configurator. Not reconstructed from documentation. Three earlier
attempts to write a reasonable-looking subset each failed inside the
installer, and each failure was invisible until the guest's tty1 was
read behind the ISO's `quiet splash` cmdline:
- a partition missing sector_size inside start/size:
KeyError: 'sector_size'
- a partition missing mount_options:
KeyError: 'mount_options'
- a `#` comment inside the YAML block scalar, which is literal text:
json.decoder.JSONDecodeError: Expecting property name enclosed in
double quotes
archinstall indexes status/start/size/mount_options/mountpoint/dev_path/
type/obj_id with NO default — flags, fs_type and btrfs are the only
.get() ones — so all eight are mandatory on EVERY partition, the ESP
included. Matching the configurator exactly is worth more than judgement
about which fields look required.
Also ported and previously absent entirely: the `omarchy_install`
section (mode, defer_provisioning, target_mount, the boot block naming
esp_mount /boot and efi_binary limine_x64.efi, storage.kernel), and
bootloader_config as an OBJECT rather than a top-level "bootloader"
string.
Partition geometry mirrors the configurator's arithmetic exactly, using
the seed context's disk size and sdk's add/sub/mib/gib:
gpt_backup_reserve = 1 MiB
boot_partition_start = 1 MiB
boot_partition_size = 2 GiB
main_partition_start = boot_size + boot_start
main_partition_size = disk - main_start - gpt_backup_reserve
kernels is "linux", not "linux-t2": the configurator picks linux-t2 only
when lspci sees Apple's T2 bridge (106b:1801/1802), which a VM never
does — even though the ISO's own default GRUB entry boots linux-t2.
authorized_keys is worth more than it looks: it seeds the account's
keys, ENABLES sshd and OPENS the firewall port. A stock Omarchy install
ships openssh disabled and the port closed.
One template defect found by rendering rather than reading: a `{{- end}}`
trim on authorized_keys looked right with ONE key and concatenated TWO
onto one line, which sshd reads as a single malformed key and rejects
both. Now `|-` (YAML strip chomp), with the reason in the file, because
the single-key case looks fine either way.
PROVEN END TO END: a real 40 GiB QEMU/OVMF guest booted the genuine
omarchy-4.0.1.iso, consumed this seed, installed unattended, rebooted
from disk, and logged in at its own greeter with the user/user
credentials this block hashes. The disk went from 197,248 bytes to
6,135,939,072.
Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3
Review — BLOCKHead SHA: Change class: config-only — one Security screen: PASS — no scope mismatch (body accounts for all 8 added files), no secrets/exfiltration (templates use Blocks
Verdict: BLOCK ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — config-only addition to Checklist: All applicable rules PASS or NA. Comment intake:
Independent verification of current state:
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
Review — PASSHead SHA: Security screen: PASS — config-only addition to Checklist: All applicable rules PASS or NA. Comment intake:
Independent verification of current state:
Verdict: PASS ollama/deepseek-v4-flash — pi-review-action. |
main ships the omarchy `installer:` block (#485) with a plugin-vm that does not implement `source.kind: iso`. So the answer format is there and unusable: charly: error: command "vm": vm "omarchy-vm": unsupported source.kind "iso" (want one of cloud_image, bootc, bootstrap) #485 carried this bump as a second commit; the squash-merge landed only charly/charly.yml. Confirmed: $ git show --stat 5caaf43 | tail -2 charly/charly.yml | 236 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 236 insertions(+) So this is not a new dependency decision — it is the half of #485 that did not land, restored, and re-verified against what is published now rather than what was published then. plugin-vm v0.2026240.2034 -> v0.2026242.1323 plugin-distro v0.2026242.804 -> v0.2026242.1131 sdk v0.2026241.2111 -> v0.2026242.1250 spec v0.2026242.753 -> v0.2026242.1251 plugin-vm brings the iso engine (#8), the virtio answers volume (#9) and the per-domain seed (#10). plugin-distro brings the resolver that stops `installer:` arriving nil at every consumer (#6) — without it the block in charly.yml is silently dropped even once the engine exists. sdk and spec bring the seed context's disk_size_bytes and the template arithmetic the partition geometry needs. Verified: `task build:binary` passes its own go.work.sum drift guard, and the resulting binary builds an iso VM — vm-build and vm-create both PASS on check-omarchy-iso-vm, where the previous binary failed in 761 ms with the error above. Claude-Session: https://claude.ai/code/session_01YKF2VLqeHHbrBDz8XftaD3 Co-authored-by: atrawog <[email protected]>
* chore(deps): adopt sdk v0.2026308.444 and spec v0.2026308.344 Producer-first contract bump: - opencharly/spec #291 merged c9343efc2e344706d885053161d01129864b51a2, tag v0.2026308.344 - opencharly/sdk #483 merged 1175c7c7651b5789f40838abf027676329854f42, tag v0.2026308.351 - opencharly/sdk #485 merged 57221e49b93d017fa60c135914df530067a4a7f7, tag v0.2026308.444 (repairs sdk#484: the namespace-diamond member collision in the .351 fold) The .351 tag is not adopted: it made charly box validate fail with a phantom deploy-level member collision on the arch + cachyos.arch diamond. .444 dedupes diamond members by logical origin instead of node pointer, and box validate is green again with 603 candies, 122 boxes, 49 deploys, 7 distros, 7 builders, 0 warnings. Adopted in charly/go.mod and in the three lockstep tools modules that carry the shared pins (tools/generate-packages, tools/golden-cloudinit, tools/golden-compile), as TestContractPinsMatchEverywhere requires. Gate on this tree: go mod tidy twice per module (second no-op); go build ./...; go vet ./...; go test ./...; tools sweep; scripts/bootstrap-charly.sh; charly box validate. All rc=0. Agent: containerd-crabbox-program/pin1083 Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * chore(deps): adopt sdk v0.2026308.652 (umbrella-load repair) - opencharly/sdk #486 merged ca7aef33e2d3f1ece96f3877072d23a9ba0e1c46, tag v0.2026308.652 (relaxes the FoldMembers origin identity for one repo mounted at two refs) The umbrella imports distro-cachyos at two tags (v2026.281.1001 via charly/layer-openclaw and v2026.290.2137 via layer-strata). The .444 origin identity included the ref, so the same member under cachyos-gpu was reported as a collision; .652 folds it and keeps different repos and different import subpaths as hard errors. box validate from the umbrella root: rc=1 before (the .444 binary), rc=0 after (609 candies, 198 boxes, 7 distros, 7 builders, 0 warnings). Gate on this tree: gofmt -l (empty); go mod tidy twice per module (second no-op); go build ./...; go vet ./...; go test ./...; tools sweep; bootstrap-charly.sh; charly box validate (603 candies, 122 boxes, 49 deploys); umbrella box validate (609 candies, 198 boxes). All rc=0. Agent: containerd-crabbox-program/pin1083 Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated) * fix(check): compose the `vm` substrate so check-sidecar-pod's member can deploy `check-sidecar-pod` declares a deploy-level VM member (`from: eval-vm` at charly.yml:1243), and `sdk/deploykit.BringUpMembers` dispatches `deploy add` for it. A `vm:` deploy needs the `vm` substrate, and this project imported only the six distro layers — so the member deploy refused: the "vm" deploy substrate is not available in this project — its deploy plugin (plugin-deploy-vm) is not in the candy closure That refusal is the last surviving failure of the bed this whole chain exists for. Measured across five runs, each exposing the next layer: 2026.307.2144 short-name "charly/check-sidecar-pod" (deploy key, pre-plugin-fix) 2026.308.0128 resolving ref "charly.eval-vm" for "pod" (substrate defaulted to pod) 2026.308.0525 vm substrate not available (charly's root) (fold fixed, venue lacked it) 2026.308.0722 short-name "charly.check-k8s-deploy-app" (pins without the overlay fix) 2026.308.0842 vm substrate not available (umbrella) (this import missing) Neither project composed it: `charly/charly.yml` had zero occurrences outside two comments, and the umbrella imports only `./charly`. Verified: `charly box validate` goes 603 -> 604 candies, 0 warnings, 0 errors — the extra candy is plugin-deploy-vm — and the full R10 bed then passes end to end, all 19 steps, RC=0, errors: 0 (run 2026.308.1106 on a disposable VM target), including bring-up-members, check-live, the fresh `charly update` rebuild, and check-live-rebuild. Agent: containerd-crabbox-program, session 8b1c01cf-7f79-4a75-bff8-240415a06208 Assisted-by: Claude Code ollama-cloud/deepseek-v4.1-flash (fully tested and validated) --------- Co-authored-by: Andreas Trawoeger <[email protected]>
Summary
The
omarchydistro entity (#476) gained everything an ISO install needs except the answersthemselves. This adds the
installer:block — eight files withwhen:guards, renderedby sdk's
RenderInstallerSeedonto acidatavolume and consumed by plugin-vm'sBuildIsoVM.It works end to end, on a binary built from this branch plus the unmerged plugin-vm#8 (see R9 below). A real 40 GiB QEMU/OVMF guest booted the genuine
omarchy-4.0.1.iso, consumed the seed this block renders, installed unattended,rebooted from disk, and logged in at its own greeter with the
user/usercredentials thisblock hashes. Evidence below.
user_configuration.jsonis a field-for-field port, not a reconstructionRead out of the shipping ISO's squashfs at
/root/configurator. That matters, becausethree earlier attempts to write a reasonable-looking subset each failed inside the
installer, and every failure was invisible until the guest's tty1 was read behind the ISO's
quiet splashcmdline:sector_sizeinsidestart/sizeKeyError: 'sector_size'mount_optionson the ESPKeyError: 'mount_options'#comment inside the YAML block scalarjson.decoder.JSONDecodeError: Expecting property name enclosed in double quotesarchinstall indexes
status,start,size,mount_options,mountpoint,dev_path,typeandobj_idwith no default —flags,fs_typeandbtrfsare the only.get()ones — so all eight are mandatory on every partition, the ESP included.Matching the configurator exactly is worth more than judgement about which fields look
required.
Two things were absent entirely from the first draft and are now ported:
omarchy_installsection (mode,defer_provisioning,target_mount, thebootblock namingesp_mount: /bootandefi_binary: limine_x64.efi,storage.kernel) —.automated_script.shitself reads.omarchy_install.defer_provisioningwith jqbootloader_configas an object ({bootloader, uki, removable}), not a top-level"bootloader": "Limine"stringPartition geometry
Mirrors the configurator's arithmetic exactly, using the seed context's disk size
(spec#80) and sdk's
add/sub/mib/gib(sdk#196):The configurator computes the disk size with
lsblk -bdno SIZE; a host-rendered seed has nosuch disk yet, which is why the number arrives in the context and everything else stays
constant here.
kernels: ["linux"], notlinux-t2The configurator picks
linux-t2only whenlspcisees Apple's T2 bridge(
106b:1801/1802), which a VM never does — even though the ISO's own default GRUB entryboots
vmlinuz-linux-t2. Worth stating, because that entry is surprising and invites thewrong conclusion.
The
when:guards carry the optional matrixdefer_provisioningdefer-provisioninginstead ofuser_credentials.json—omarchy-cidata-loadtreats the marker as standing in for credentials, so shipping both would create the very account deferral exists to avoidencryptuser_encrypt_installation.txtand inlinesdisk_encryption(withlvm_volumes: [], as the configurator writes it)full_name/email.txtfilesssh_authorized_keyauthorized_keysanswer.tailscale_authkeytailscale_authkeyauthorized_keysdoes three things: seeds the account's keys, enables sshd, andopens the firewall port. A stock Omarchy install ships openssh with the service disabled
and the port closed.
How tested
1 — a real unattended install, start to finish
charly vm build omarchy-vmfetched and sha256-verified the 5.8 GiB ISO, rendered thisblock's answers, and wrote the volume:
The guest's own loader accepted the volume — run inside the live environment:
All five files copied into
/rootby Omarchy's own script, unmodified.The install ran and completed. The disk went from a freshly created empty qcow2 to a
populated one:
The guest rebooted from disk into its own greeter — a graphical password prompt, where
the live ISO instead autologins to a root shell — and
user/user(the credentials thisblock hashes to
$6$) logged in to a working Omarchy desktop: Hyprland with theQuickshell bar showing workspaces 1–5, a clock, the tray, the Omarchy wallpaper, and the
first-run "Update System" / "Learn Keybindings" cards.
Both cdroms remained attached throughout, and nothing ejected anything — the disk-first
boot order is what makes that safe.
2 — the password never reaches the volume in plaintext
user_credentials.jsonas actually written:{ "root_enc_password": "$6$a6/YhahdrEulp/Un$UcHaTGFNyV6qsz6dRF5aKHuGGUsi5pF3802Fle…", "users": [ { "enc_password": "$6$a6/YhahdrEulp/Un$UcHaTGFNyV6qsz6dRF5aKHuGGUsi5pF3802Fle…", "groups": [], "sudo": true, "username": "user" } ] }Note
users, not!users— read off the configurator, not guessed from cloud-init'sschema, which uses the bang form for something else.
3 — the volume itself
The label matches what
genisoimageproduces byte-for-byte, which is whatomarchy-cidata-loadgreps/dev/disk/by-labelfor.4 — all four shapes render, and the contract is checked mechanically
A harness decodes the
omarchyentity fromcharly/charly.yml, calls the realvmshared.RenderInstallerSeed, and validates the JSON:and the rendered partitions are checked against archinstall's own required-key set and the
geometry against the disk size:
5 — a template defect found by rendering rather than reading
The
authorized_keystemplate first used a{{- end}}trim. With one key it lookedcorrect; with two it concatenated them onto one line —
— which sshd reads as a single malformed key and rejects both, leaving a silently
unreachable guest. Now
|-(YAML strip chomp), correct for any count, with the reasonrecorded in the file because the single-key case looks fine either way.
6 — gates
Only
charly/charly.ymlis in this commit — verified before pushing. The devreplacedirectives used to build a binary carrying the unmerged plugin-vm branch are working-tree
only and were not staged.
Dependencies
Needs plugin-vm#8 (the
isoengine), and the already-merged spec#80 (disk_size_bytes),sdk#196 (template arithmetic), plugin-distro#6 and spec#79 (two silent field drops that
made the distro's
installer:block arrive nil at every consumer).Rulebook compliance
named missing key or a YAML/JSON boundary error, not patched by trial. The
quiet splashcmdline that hid all three is recorded in the file so the next person finds them faster.
ported, not a subset: the partition contract in full, plus
omarchy_installandbootloader_config, both of which were missing entirely from the first draft. Themechanical check below asserts
missing NOTHINGper partition rather than relying on myreading. The one deliberate omission is
omarchy-nvimfrompackages, which theconfigurator adds from an ISO-local env file and which no charly consumer needs.
the data is the VM entity's, the arithmetic is sdk's four funcs.
when:templates, the mechanism theschema provides. No post-render fixups, no sleeps, no retries.
sector_size/mount_optionsomissions were fixedin the template, not documented as caveats. The one thing that IS only documented is the
#-in-a-block-scalar hazard, which is a YAML property this repo cannot fix.replaced wholesale rather than patched field by field, and its
"bootloader": "Limine"top-level key is gone rather than left beside the object form.
git statusinspected before each commit; the two working-treereplacedirectives were confirmed unstaged before pushing. No force-push, no directpush to
main.not a parse. The render harness additionally fails on any partition missing a required
key — it caught two omissions before the guest ever booted.
it is validated at its actual boundary twice: the JSON is parsed and its partition
contract checked on the host, and Omarchy's own
omarchy-cidata-loadaccepted thevolume unmodified (
LOADRC=0) inside the guest.cannot fully satisfy on its own, and it is not claimed.
fresh NVRAM copy, from a seed regenerated by the committed tree. It is NOT yet a
disposable: truebed — see below.R9, stated plainly, and what it costs this PR
The install ran on a binary built from two branches: this one and the unmerged
plugin-vm#8. It is reproducible —
charly@5401b6f2+plugin-vm@98077d9, both public — butit is not reproducible from this PR's tree alone, because charly does not yet pin a
plugin-vm carrying the
isoengine.charly versionon that binary therefore identifies atree that is not this commit.
An earlier revision of this body claimed
fully tested and validatedwithout saying so.That was wrong and the validator was right to block it.
So the tier is
analysed on a live system. What that concedes precisely: the answersthis block renders are fully verified — parsed, contract-checked, accepted by Omarchy's own
loader, and used to complete a real install — but the binary that packed them cannot be
rebuilt from this commit.
The route back to
fully tested and validatedis named, not vague: plugin-vm#8 merges,charly pins it, and
check-omarchy-iso-vmruns as adisposable: truebed indistro-omarchy. That bed is itself blocked on distro-omarchy#4 (the ISO's boot-timecidata race — its
udevadm settledoes not cover a SATA cdrom that has not been enumeratedyet, so
.automated_script.shfalls back to the interactive wizard and exits; running thesame entry point a minute later succeeds, which is how the install above was driven).
Change classification
installer:block on one distro entity); no Go changecharly box validate,go test -count=1 ./charly/..., and a live render of all four seed shapes with the partition contract checked mechanicallyanalysed on a live system— the changed path ran live with retained output and its end product installed itself unattended, but the binary that packed the seed carried an unmerged branch, so it does not match this committed tree (R9). Notfully tested and validateduntil the bed named above runs.Assisted-by: Claude Code claude-opus-4-6-20260401 (analysed on a live system)