Installer GUI #4
Labels
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Depends on
#6 Declarative disk layouts (disko templates)
jmarya/myverse
Reference
jmarya/myverse#4
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Implement opinionated installer GUI and improve live image
Design idea: the installer generates artifacts, it does not install
The title is a bit misleading — this shouldn't be a Calamares-style installer. A classic installer performs an installation (partition, unpack, chroot) and the machine's identity afterwards is whatever residue that left behind; nothing about the result is re-derivable.
The declarative version inverts it: the GUI's only output is files. It writes a
machines/<host>/directory, and a separate, boring, replayable step consumes it.If the GUI crashes halfway, nothing is lost but keystrokes. Anyone can skip the GUI and hand-write the directory — the escape hatch the README already promises.
Wizard flow
"local or remote" as step 1 is nearly free once the pipeline is spec → artifacts → apply: same spec, same generated directory, different applier. It also means the ISO isn't always in the picture — a remote install can target any SSH-reachable box in any installer or kexec image.
Probe-before-disk is why this can't be a pure form: step 2 has to actually execute somewhere before step 3 has anything to offer.
Screen 8 is what makes this opinionated rather than magic. Eight questions replace dozens of NixOS decisions, so the payment is showing exactly what Nix was generated before running it. It's also the free QA path — the generator's output can be reviewed without installing anything.
Prerequisites (the actual work)
disko— not an input anywhere in the tree today. Without it the partitioning step is imperative and the artifact set is incomplete: a machine could not be reinstalled from its own files. Biggest gap, and worth doing on its own merits regardless of whether the GUI ever ships.nixos-facterchecks in a JSON hardware report and derives config at eval time; the artifact is a fact about the machine rather than a guess about its config.hardware-configuration.nixas fallback.profiles.*.Opinionated disks
"Opinionated" should mean no partition editor ships. Named layouts as a myverse module:
The GUI asks two questions instead of exposing a partition table. Advanced users write raw disko in
disk.nixand the module gets out of the way. The opinion lives here, not in the UI.Registering into a flake
If the target flake uses
myverse.fleet, adding a machine is dropping a directory —autoDiscoverreadsmachines/and picks it up with zero Nix edits. Already implemented, and it's a genuinely clean path.If the flake doesn't use fleet, registering would mean parsing and rewriting arbitrary Nix. Don't. Write the directory, print the snippet for the user to paste. Honest boundary, and it quietly makes
myverse.fleetthe paved road.Friction points where "mostly declarative" needs a decision
/etc/nixosis root-owned — fine for the local-only exit, hostile the moment the artifacts are meant to be pushed to a git remote (nogit pushwithout sudo, and comin wants its own checkout). Local-only →/etc/nixos; fleet exits → somewhere user-owned with--flakepointed at it.configuration.nixis fine until step 7 says "push to your remote". UsehashedPasswordFilewritten out-of-band, orinitialPassword+ forced change. Rule to hold: the generated artifact set contains zero secrets, so it is always safe to push./etc/nixos. For a remote install the artifacts belong on the operator's machine, not the target — the target only receives a closure. Screen 7 means something different in each branch and the UI should say so.Exits
/etc/nixos, rebuild by hand. No git, no remote.machines/<host>/, enableprofiles.comin, print the host pubkey to register as a deploy key. Machine self-updates from then on.machines/<host>/, push a branch. Adding a machine becomes a commit, and the installer's whole job was to author it.Suggested build order
diskomodule with named layouts → facter probe → amyverse-installCLI taking a spec JSON → a Dioxus GUI over it.Making the CLI the real interface (GUI as a skin that builds the spec and shells out) means unattended installs, VM-tested installs, and
myverse-install --flake <fleet>#<host>re-installs all come free, instead of GUI and headless being two implementations. The first three steps are independently useful and testable in a VM; the GUI is not.Scope: the CLI is a first-class front end, not a fallback
Making it explicit, since it changes what "done" means for this issue. Three front ends, one engine, and none of them may be a second-class citizen:
myverse-install— interactive prompts in the terminal. Same questions, same generatedmachines/<host>/, same review step. No desktop, no Wayland, works over SSH into the live image. This is the reference implementation.myverse-install --spec host.toml, no prompts at all. Boot the ISO with a spec (kernel cmdline, a file baked into a custom image, or fetched over the network) and the machine installs itself.The unattended mode is not a fourth code path. Once the pipeline is
spec -> artifacts -> apply, "autoinstall" is just supplying the spec up front instead of typing it, so it costs roughly nothing beyond a serializable spec format and a--specflag. Worth designing the spec file for that from the start rather than retrofitting.Practical payoffs beyond convenience: installs become testable in CI (feed a spec, boot a VM, assert the result), a reinstall is re-running the same spec against the existing host dir, and provisioning several machines stops being several sittings.
Acceptance for this issue should be that the CLI can do everything the GUI can, and that at least one machine class can install with no interaction at all.