diff --git a/agent/BACKLOG.md b/agent/BACKLOG.md index 44320c7..0b2f03a 100644 --- a/agent/BACKLOG.md +++ b/agent/BACKLOG.md @@ -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 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 -declared and populated **only on the Home Manager side** (`modules/home/ -options.nix`, filled by `theme.nix`). On the NixOS side the attribute is -absent, and `or ` swallows the missing-attribute error — so these -defaults have silently always been their fallback on every machine: +Found while wiring System › Auto-login (2026-07-14); **enumeration corrected +2026-07-14** — the original said "three options … benign today", and both +halves were wrong (see the Bluetooth/Printing rows). -- `nomarchy.system.greeter.autoLogin` — **fixed in this commit** (now reads - the state via `theme-state-read.nix` in `greeter.nix`, the working pattern - from `hardware.nix`/`timezone.nix`). Left here as the worked example. -- `modules/nixos/options.nix` `bluetooth.enable` — `settings.bluetooth.enable` - never read; benign today (fallback `true` = the intended default) but the - 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. +`nomarchy.settings` is declared in exactly ONE place — +`modules/home/options.nix:412`, the Home Manager side, filled by `theme.nix`. +On the NixOS side the attribute does not exist at all, and `or ` +swallows the missing-attribute error, so every read below has silently always +been its fallback on every machine ever built: -Decide per option whether the state key should work (wire it like the -greeter) or the phantom read should just go. The trap is that `or` makes both -a live bridge and a dead one look identical — a grep for -`config.nomarchy.settings` under `modules/nixos/` should return nothing when -this is done. Pass = no NixOS option claims a state default it cannot read, -and any bridge kept is proved by an eval that flips with the state file. +- `modules/nixos/greeter.nix` `system.greeter.autoLogin` — **fixed** in + eb38008 (reads the state via `theme-state-read.nix`, the working pattern + from `hardware.nix`/`timezone.nix`). The worked example; copy this shape. +- `modules/nixos/options.nix` `bluetooth.enable` — **live bug, not benign.** + The TUI control center (`nomarchy-control-center.sh:192`, shipped in + `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