Night light is off by default and configured entirely through the menu,
writing into the downstream flake instead of ~/.local/state — so the
choice is git-tracked and reproducible across a clone+rebuild.
Two flags under a new settings.* section of the state file (exposed as
the nomarchy.settings option):
- settings.nightlight.installed — sticky, gates the hyprsunset unit;
nomarchy.nightlight.enable mkDefault-reads it. First enable from the
menu rebuilds to create the unit (the one accepted rebuild).
- settings.nightlight.on — runtime on/off, toggled instantly
(theme-sync set --no-switch + systemctl), no rebuild. An ExecCondition
reads the live flag at session start so an off survives reboot;
splitting it from the sticky flag means a later unrelated rebuild
never undoes an instant-off (no decay).
Drops the ~/.local/state/nomarchy/nightlight-off marker and the
ConditionPathExists hack. theme-sync set now skips the wallpaper
re-apply for non-wallpaper keys, and its rebuild notifications are
generic ("changes" not "theme").
First cut of the broader principle — any user-settable config gets a
menu writer that lands it in the flake; no state outside the checkout.
Docs (README §4, ROADMAP, template) updated to reflect it.
Eval- and round-trip-verified; on-hardware check pending.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
My Nomarchy machine
- Overwrite the placeholder hardware config with the real one:
nixos-generate-config --show-hardware-config > hardware-configuration.nix - Set
flake.nixup once (Nomarchy repo URL, your username, optionally ahardwareProfilefrom https://github.com/NixOS/nixos-hardware — an unknown name fails the rebuild with suggestions). After that the flake is never touched again: your machine lives insystem.nix(hostname, services — the login user is created fromusernameautomatically) andhome.nix(your packages). git init && git add -A— flakes only see tracked files, includingtheme-state.json.- System:
sudo nixos-rebuild switch --flake .#default - Desktop:
nix run home-manager -- switch --flake .#me(afterwards justhome-manager switch --flake .#me— it's installed) - Clone/symlink this directory to
~/.nomarchy(or exportNOMARCHY_PATH) sonomarchy-theme-syncknows where the state lives.
Day-to-day:
nomarchy-theme-sync list # 21 shipped presets
nomarchy-theme-sync apply gruvbox # writes state + home-manager switch
nomarchy-theme-sync bg next # cycle wallpapers (instant, no rebuild)
The system layer only needs nixos-rebuild when you change system.nix.