fix(install): normalize empty keyboard variants
All checks were successful
Check / eval (push) Successful in 3m18s

Treat the picker-only (none) row as an empty XKB variant at the shared input boundary and again in the template patcher. Guard the real downstream output and console keymap, and carry the sentinel through the offline installer VM.

Verified: V0 full flake evaluation plus shell/Python/Nix/diff checks; V1 installer-keyboard, installer-safety, and template-SoT builds; V2 full KVM offline LUKS+swap install and themed first boot. No V3 required.
This commit is contained in:
2026-07-13 15:01:51 +01:00
parent 7bfe1af5b1
commit 9d0abe5422
9 changed files with 179 additions and 23 deletions

View File

@@ -30,22 +30,17 @@ These are separate queue items from one real install/session pass. Preserve
that separation when fixing them: the installer blocker, unclear installer
copy, and post-install desktop failures have different verification paths.
### 91. Installer: empty keyboard variant becomes literal `(none)` and blocks installation
The generated system fails at `xkb-console-keymap.drv` with
`WARNING: Can not find "(none)" in "us"` followed by ckbcomp's `bad include
list`; every later system derivation is only a cascading dependency failure.
Normalize the picker's “no variant” value to the empty string before writing
Nix, and add an installer regression case for `us` + no variant. Pass = the
generated console/XKB configuration builds and the install proceeds.
### 92. Installer: keyboard selection is confusing
Make the layout/variant relationship and the “no variant” choice explicit;
show a human-readable preview/current choice before confirmation. Keep the
simple default path short. Pass = a user can deliberately choose US with no
variant without knowing XKB terminology, and the generated values are shown
before installation.
show a human-readable preview/current choice before confirmation. Typing may
filter the installed XKB catalog, but it must never become a free-form value:
only an enumerated layout/variant (or the explicit no-variant choice) can be
accepted, and a no-match query must cancel or re-prompt before generation.
Keep the simple default path short. Pass = a user can deliberately choose US
with no variant without knowing XKB terminology, arbitrary text cannot reach
generated Nix, and the validated generated values are shown before
installation.
### 93. Installer: swap-size field lacks a clear prompt/explanation

View File

@@ -124,10 +124,16 @@ the **T14s** (webcam case).
(SUPER+? / root menu Keybindings) now ends in ↩ Back and
returns to the root picker; spot a couple of submenus (Display,
VPN Tailscale) still Back correctly after the audit pass.
- [ ] **Keyboard hotplug picker (re-verify after in-flake graduation)**
plug an external keyboard post-login, pick a layout in rofi, confirm
it applies per-device only, persists in `settings.keyboard.devices`,
and graduates into a `device{}` block on the next rebuild.
- [ ] **Per-device keyboard menu + hotplug restore (re-verify after in-flake
graduation)** — update to the current `main`, run `nomarchy-home`, and
relogin with an external keyboard already connected. Open System
Keyboard: both the built-in and external boards must be listed with
their current layouts. Pick a different layout for the external board;
it must apply only there and persist in `settings.keyboard.devices`.
Unplug/replug it: the saved layout must restore without another prompt
and graduate into a `device{}` block on the next rebuild. Finally plug
a previously unseen keyboard in after login: the automatic picker must
appear once and remember that choice too.
- [ ] **Snapshots restore + rollback exercise** (residual — the
GUI/polkit half passed on hardware 2026-07-04, a47aa3a): in
`sudo nomarchy-snapshots`, restore a single file (`undochange`)

View File

@@ -19,6 +19,21 @@ Template:
---
## 2026-07-13 — #91 installer no-variant normalization (this commit)
- **Task:** Stop the keyboard picker's display-only `(none)` value from
breaking generated `xkb-console-keymap.drv` and the whole installation.
- **Did:** Normalize at the shared input boundary and defensively in the real
template patcher. Added a `us` + sentinel fixture, actual console-keymap
build, and made the offline installer VM carry the literal sentinel.
- **Verified:** V2 — full flake eval; focused installer-keyboard/safety/
template builds; shell/Python/Nix syntax and diff checks; KVM
`tools/test-install.sh` installed offline with LUKS + swap, powered off after
~400s, unlocked, and booted the themed desktop. Inspected install progress,
LUKS, and first-boot captures under `/tmp/nomarchy-vm/`.
- **Pending:** #92 now explicitly forbids free-form XKB values. Expanded the
existing per-device keyboard hardware check for the connected-at-login menu.
- **Next suggestion:** #92 installer keyboard selection clarity/safety.
## 2026-07-13 — #101 charge-limit AC-event burst recovery (this commit)
- **Task:** Fix `nomarchy-battery-charge-limit.service` failing when USB-C
dock power events arrive while its settling write is still active.