Write pins.json from theme-home.nix, so the dev config evaluates again #22

Merged
arne merged 1 commit from fix-dev-config into main 2026-11-06 16:59:47 +01:00
Owner

nix build .#dev-config (and so dev/fjordxy-dev up) failed on main with an infinite recursion at nix/dev-config.nix:45, while evaluating xdg.configFile from nix/niri.nix.

Cause. 1f95aea added xdg.configFile."fjordxy/pins.json" to nix/niri.nix. That module is also evaluated by nix/dev-config.nix, outside home-manager, where home.packages and xdg.stateHome are the only stubbed home-manager options. The undeclared option surfaced as a recursion through fjordxyConfig rather than as "option does not exist".

Fix. Same approach as the ghostty config (see the comment above home.packages in niri.nix): the home-manager-only write leaves niri.nix. The pins.json write and the deskPinned definition search now live in nix/theme-home.nix, next to the fjordxy-theme unit whose switcher reads the file. It is still gated on niri.enable. The dev config still stacks the same modules as before. I didn't add a stub for xdg.configFile, because that would have hidden the next home-manager leak.

Verified

  • nix build .#dev-config succeeds.
  • Real home-manager eval (the ISO's nixos user): pins.json is {} by default and {"desk_background":"#00000000"} when the consumer sets layout.background-color. Same as before.
  • dev/fjordxy-dev up + shot (run inside nix develop for quickshell): the rail is drawn.
  • Quickshell reported "EGL not available" in this environment and couldn't create a GL context, so the screenshot was taken with QT_QUICK_BACKEND=software. This looks like an environment issue and is not related to this change.

Unrelated, and not fixed here: evaluating the ISO's NixOS config currently fails with The option `services.avahi.settings' does not exist (set in nix/remote.nix).

🤖 Generated with Claude Code

`nix build .#dev-config` (and so `dev/fjordxy-dev up`) failed on main with an infinite recursion at `nix/dev-config.nix:45`, while evaluating `xdg.configFile` from `nix/niri.nix`. **Cause.** 1f95aea added `xdg.configFile."fjordxy/pins.json"` to `nix/niri.nix`. That module is also evaluated by `nix/dev-config.nix`, outside home-manager, where `home.packages` and `xdg.stateHome` are the only stubbed home-manager options. The undeclared option surfaced as a recursion through `fjordxyConfig` rather than as "option does not exist". **Fix.** Same approach as the ghostty config (see the comment above `home.packages` in niri.nix): the home-manager-only write leaves niri.nix. The `pins.json` write and the `deskPinned` definition search now live in `nix/theme-home.nix`, next to the `fjordxy-theme` unit whose switcher reads the file. It is still gated on `niri.enable`. The dev config still stacks the same modules as before. I didn't add a stub for `xdg.configFile`, because that would have hidden the next home-manager leak. **Verified** - `nix build .#dev-config` succeeds. - Real home-manager eval (the ISO's `nixos` user): `pins.json` is `{}` by default and `{"desk_background":"#00000000"}` when the consumer sets `layout.background-color`. Same as before. - `dev/fjordxy-dev up` + `shot` (run inside `nix develop` for quickshell): the rail is drawn. - Quickshell reported **"EGL not available"** in this environment and couldn't create a GL context, so the screenshot was taken with `QT_QUICK_BACKEND=software`. This looks like an environment issue and is not related to this change. Unrelated, and not fixed here: evaluating the ISO's NixOS config currently fails with ``The option `services.avahi.settings' does not exist`` (set in `nix/remote.nix`). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1f95aea put `xdg.configFile."fjordxy/pins.json"` in nix/niri.nix. That
module is also evaluated by nix/dev-config.nix outside home-manager, where
`xdg.configFile` is not an option, and `nix build .#dev-config` failed —
as an infinite recursion through `fjordxyConfig` rather than a missing
option. The write and the `deskPinned` search move to theme-home.nix,
beside the switcher that reads the file; the output is unchanged.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
arne force-pushed fix-dev-config from 69b914846d to f67c0105b1 2026-11-06 16:59:44 +01:00 Compare
arne merged commit ec0204d496 into main 2026-11-06 16:59:47 +01:00
arne deleted branch fix-dev-config 2026-11-06 16:59:47 +01:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
bases/fjord!22
No description provided.