feat: opencode.installPackage toggle and OpenCode README section#2
Merged
Merged
Conversation
Adds `darkmatter.agentSkills.opencode.installPackage` (default true) so consumers managing the opencode binary outside Home Manager (Homebrew, manual install) can skip HM's `pkgs.opencode` add to `home.packages`. When false, a tiny stub derivation is substituted into `programs.opencode.package` — required because setting it to null currently crashes the upstream HM warnings block (calls `lib.versionAtLeast` on a null version). README updates: - Drop `targets.opencode.enable = true` from the registry-skills example. The darkmatter preset now installs OpenCode skills via `programs.opencode.skills`, and enabling the agent-skills opencode target would overlap with the preset's per-skill entries. - New OpenCode subsection documenting how skills land in OpenCode, the known third-party-source limitation, and the installPackage toggle. Lock bump for `darkmatter-agents` follows once the upstream PR lands. Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
darkmatter.agentSkills.opencode.installPackage(defaulttrue). Whenfalse, skips Home Manager'spkgs.opencodeinstall — useful when opencode is managed via Homebrew or another channel. Config files and skills are still installed either way.targets.opencode.enable = truefrom the registry-skills example and adds a dedicated OpenCode subsection explaining how skills land there and what the current limitation is.Why the stub package
Setting
programs.opencode.package = nulldirectly crashes the upstream HM warnings block — it callslib.versionAtLeaston a null version (see agents PR #3 for context). Until upstream is fixed, the toggle substitutes an empty stub derivation with a version attr to satisfylib.getVersionwithout putting anopencodebinary on PATH.Pairs with
programs.opencode.*). Once that merges, runnix flake update darkmatter-agentshere to pick up the EACCES fix; this PR is independent and can land first or second.Test plan
nix evalconfirmsprograms.opencode.package.name == "opencode-1.14.48"wheninstallPackage = true.nix evalconfirmsprograms.opencode.package.name == "opencode-stub"(version 1.2.15) wheninstallPackage = false.opencode/opencode.json) and skill entries still present in both modes.home-manager switchon a host that usesdarkmatter.agentSkills.opencode.installPackage = falseand confirm no conflict with a brew-installed opencode.🤖 Generated with Claude Code