Skip to content

fix(home-manager): supply opencodeConfigOverlays, expose opencode.settings#3

Merged
cooper (czxtm) merged 1 commit into
mainfrom
fix/opencode-config-overlays-arg
May 20, 2026
Merged

fix(home-manager): supply opencodeConfigOverlays, expose opencode.settings#3
cooper (czxtm) merged 1 commit into
mainfrom
fix/opencode-config-overlays-arg

Conversation

@czxtm
Copy link
Copy Markdown
Member

Summary

  • Set _module.args.opencodeConfigOverlays so the skills HM module stops failing with attribute 'opencodeConfigOverlays' missing during darwin/HM evaluation. The in-signature ? [ ] default isn't honored because HM uses builtins.functionArgs and pulls every formal through _module.args, just like personalAgentSkillsPath.
  • Add darkmatter.agentSkills.opencode.settings as the consumer-facing knob, matching upstream programs.opencode.settings (uses (pkgs.formats.json {}).type, default = { }). Internally translated to a single-element overlay so the skills repo's overlay machinery is unchanged.

Test plan

  • darwin-rebuild build --flake ~/darwin#$(hostname -s) --override-input darkmatter-tools path:/Users/cm/git/darkmatter/tools succeeds (exit 0).
  • After merge, bump darkmatter-tools in ~/darwin/flake.lock and re-run darwin-rebuild switch.
  • Smoke-test setting darkmatter.agentSkills.opencode.settings.model = "anthropic/claude-opus-4-7" and confirm it lands in ~/.config/opencode/opencode.json.

🤖 Generated with Claude Code

…settings

The darkmatter-agents (skills) HM module signature includes
`opencodeConfigOverlays ? [ ]`, but HM's module system enumerates formals
via `builtins.functionArgs` and pulls each one from `_module.args`,
bypassing the in-signature default. With no consumer setting the arg,
evaluation failed with `attribute 'opencodeConfigOverlays' missing`.

- Wire `_module.args.opencodeConfigOverlays` like
  `personalAgentSkillsPath` already is.
- Surface customization through `darkmatter.agentSkills.opencode.settings`,
  matching the schema and `(pkgs.formats.json {}).type` used by
  upstream `programs.opencode.settings`, instead of asking consumers to
  write overlay functions by hand. Translated to a single-element
  overlay internally.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@czxtm cooper (czxtm) merged commit 823ad0a into main May 20, 2026
2 checks passed
@czxtm cooper (czxtm) deleted the fix/opencode-config-overlays-arg branch May 20, 2026 19:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant