docs(agent): #116 undercounted the phantom reads, and two of them are live bugs
All checks were successful
Check / eval (push) Successful in 3m2s
All checks were successful
Check / eval (push) Successful in 3m2s
Re-grepped the tree instead of trusting eb38008's own account of it. Two corrections, both in the direction of worse: A fourth read: services.nix:80 `printing.enable`. The original enumeration only looked at options.nix, which is the same mistake in miniature as the bug it was filing — `or` hides a dead bridge, so the only honest check is a grep of all of modules/nixos/, which the item's own pass condition already said and its own list did not do. "Benign today" was wrong about Bluetooth. The TUI control center is shipped (default.nix:337) and reachable from the menu's Control Center row, and its Bluetooth and Printing toggles write settings.bluetooth.enable / settings.printing.enable and print "disabled (requires rebuild)". Nothing reads either key, so the fallback wins and the rebuild changes nothing. Two user-facing toggles that report success and do nothing — that is a live bug, not a dead key. batteryChargeLimit stays benign for the stated reason: its menu patches the baked option instead. nomarchy.settings is declared in exactly one place, modules/home/options.nix: 412 — verified, not assumed. V0: nix flake check --no-build passes. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
@@ -123,30 +123,46 @@ a suspended machine hibernates after the configured delay and resumes, and a
|
|||||||
machine without hibernate support hides the row instead of offering a
|
machine without hibernate support hides the row instead of offering a
|
||||||
suspend that never wakes.
|
suspend that never wakes.
|
||||||
|
|
||||||
### 116. Three NixOS options read a `config.nomarchy.settings` that does not exist
|
### 116. Four NixOS options read a `config.nomarchy.settings` that does not exist — two are live broken toggles
|
||||||
|
|
||||||
Found while wiring System › Auto-login (2026-07-14). `nomarchy.settings` is
|
Found while wiring System › Auto-login (2026-07-14); **enumeration corrected
|
||||||
declared and populated **only on the Home Manager side** (`modules/home/
|
2026-07-14** — the original said "three options … benign today", and both
|
||||||
options.nix`, filled by `theme.nix`). On the NixOS side the attribute is
|
halves were wrong (see the Bluetooth/Printing rows).
|
||||||
absent, and `or <fallback>` swallows the missing-attribute error — so these
|
|
||||||
defaults have silently always been their fallback on every machine:
|
|
||||||
|
|
||||||
- `nomarchy.system.greeter.autoLogin` — **fixed in this commit** (now reads
|
`nomarchy.settings` is declared in exactly ONE place —
|
||||||
the state via `theme-state-read.nix` in `greeter.nix`, the working pattern
|
`modules/home/options.nix:412`, the Home Manager side, filled by `theme.nix`.
|
||||||
from `hardware.nix`/`timezone.nix`). Left here as the worked example.
|
On the NixOS side the attribute does not exist at all, and `or <fallback>`
|
||||||
- `modules/nixos/options.nix` `bluetooth.enable` — `settings.bluetooth.enable`
|
swallows the missing-attribute error, so every read below has silently always
|
||||||
never read; benign today (fallback `true` = the intended default) but the
|
been its fallback on every machine ever built:
|
||||||
state key is dead.
|
|
||||||
- `modules/nixos/options.nix` `power.batteryChargeLimit` — `settings.power.
|
|
||||||
batteryChargeLimit` never read; the Battery limit menu works because it
|
|
||||||
patches the baked option in `system.nix` instead, which is the older model.
|
|
||||||
|
|
||||||
Decide per option whether the state key should work (wire it like the
|
- `modules/nixos/greeter.nix` `system.greeter.autoLogin` — **fixed** in
|
||||||
greeter) or the phantom read should just go. The trap is that `or` makes both
|
eb38008 (reads the state via `theme-state-read.nix`, the working pattern
|
||||||
a live bridge and a dead one look identical — a grep for
|
from `hardware.nix`/`timezone.nix`). The worked example; copy this shape.
|
||||||
`config.nomarchy.settings` under `modules/nixos/` should return nothing when
|
- `modules/nixos/options.nix` `bluetooth.enable` — **live bug, not benign.**
|
||||||
this is done. Pass = no NixOS option claims a state default it cannot read,
|
The TUI control center (`nomarchy-control-center.sh:192`, shipped in
|
||||||
and any bridge kept is proved by an eval that flips with the state file.
|
`modules/nixos/default.nix:337`, reachable from the rofi menu's "Control
|
||||||
|
Center" row) has a Bluetooth toggle that writes `settings.bluetooth.enable`
|
||||||
|
and prints "Bluetooth disabled (requires rebuild)". Nothing reads that key,
|
||||||
|
so the fallback `true` wins and Bluetooth is still on after the rebuild.
|
||||||
|
The toggle reports success and does nothing.
|
||||||
|
- `modules/nixos/services.nix:80` `printing.enable` — **live bug, same shape**
|
||||||
|
(`nomarchy-control-center.sh:203`). Missed by the original enumeration
|
||||||
|
entirely, which only looked at `options.nix`.
|
||||||
|
- `modules/nixos/options.nix:112` `power.batteryChargeLimit` — never read, but
|
||||||
|
the Battery limit menu works anyway because it patches the baked option in
|
||||||
|
`system.nix` instead (`modules/home/rofi.nix:342`), the older model. Dead
|
||||||
|
read, working feature.
|
||||||
|
|
||||||
|
Decide per option whether the state key should work (wire it like the greeter)
|
||||||
|
or the phantom read should just go — but the two control-center toggles need
|
||||||
|
one or the other, since today they lie to the user. The trap is that `or`
|
||||||
|
makes a live bridge and a dead one look identical, which is exactly how the
|
||||||
|
first pass undercounted: **grep the whole of `modules/nixos/`, not
|
||||||
|
`options.nix`.** Pass = `grep -rn 'config\.nomarchy\.settings' modules/nixos/`
|
||||||
|
returns nothing but comments, no NixOS option claims a state default it cannot
|
||||||
|
read, any bridge kept is proved by an eval that flips with the state file, and
|
||||||
|
the control-center Bluetooth/Printing toggles are proved to actually change
|
||||||
|
the built config (or are removed).
|
||||||
|
|
||||||
### 107. Rename `theme.json` to reflect that it is the system state
|
### 107. Rename `theme.json` to reflect that it is the system state
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user