refactor(#107): theme-state.json → state.json, theme-sync → state-sync
Some checks failed
Check / eval (push) Has been cancelled

The machine flake's git-tracked settings file is system state, not
"theme" only — rename it to state.json. CLI becomes nomarchy-state-sync
with a nomarchy-theme-sync symlink for scripts and muscle memory.

Eval (mkFlake, doctor, lifecycle) still accepts theme-state.json; the
next write migrates to state.json and removes the legacy file.
Documented in MIGRATION.md; drop the CLI alias after release notes.
This commit is contained in:
2026-07-15 11:26:59 +01:00
parent 013403deb4
commit d8e1a13d50
62 changed files with 463 additions and 369 deletions

View File

@@ -1,7 +1,7 @@
# nomarchy-first-boot — one-shot "you're set" toast on the first session.
# Marker is settings.firstBootShown in the flake's theme-state.json
# Marker is settings.firstBootShown in the flake's state.json
# (in-checkout state; never ~/.local/state). notify-send and
# nomarchy-theme-sync come from PATH so the VM check can shim them.
# nomarchy-state-sync come from PATH so the VM check can shim them.
# Live ISO already has its own welcome (hosts/live.nix); skip there so
# users aren't double-toasted and the live seed doesn't get a sticky
@@ -13,8 +13,8 @@ if [ "$hn" = nomarchy-live ]; then
fi
# Already shown → silent. Missing key / no checkout → treat as not shown
# (theme-sync get exits non-zero when the key is absent).
shown=$(nomarchy-theme-sync get settings.firstBootShown 2>/dev/null || true)
# (state-sync get exits non-zero when the key is absent).
shown=$(nomarchy-state-sync get settings.firstBootShown 2>/dev/null || true)
case "$shown" in
true|1|yes) exit 0 ;;
esac
@@ -46,7 +46,7 @@ if [ -z "$ok" ]; then
fi
# Persist in the checkout so re-login is silent. --no-switch: marker only.
if ! nomarchy-theme-sync --quiet set settings.firstBootShown true --no-switch; then
if ! nomarchy-state-sync --quiet set settings.firstBootShown true --no-switch; then
# No writable flake checkout (or tool missing) — still showed the toast;
# without a marker it may reappear next login. Don't fail the unit.
exit 0