Repository navigation
feat(mcpx): addPackageToProfile option; laptop takes the cascade mcpx (#5027) - #5037
Merged
Merged
Conversation
…#5027) Drew's ruling (2026-11-03): there is one mcpx — the cascade's. The laptop consumer no longer pins services.mcpx.package to this repo's own pkgs/mcpx build; it takes the fork build the module wrapper defaults to, the same derivation the opencode package's bin/mcpx links to. The mcpx home-manager module gains services.mcpx.addPackageToProfile (default true, so no existing consumer changes): the opencode package and the mcpx package are still two buildEnv providers of bin/mcpx — a real file and a symlink to it — so the profile contribution needs an opt-out. The consumer flips it in the follow-up that bumps the openchamber pin through the cascade; setting it before the option reaches this config via the pins would break evaluation here.
developing-today
Bot
requested review from
a team and
dezren39
as code owners
November 3, 2026 17:25
|
Important Review skippedBot user detected. To trigger a single review, invoke the
|
This was referenced Nov 3, 2026
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.
Ruling — Drew, 2026-11-03, superseding the earlier option-B scope for #5027: "no there shouldn't be 2. Just enable openchamber and take that one." One mcpx: the cascade's. This PR is the code-repo step of that fix, at the level the change originates — the mcpx modules live here and pass through opencode → openchamber → this config's pins.
Changes
1.
home/common/default.nix— the laptop consumer drops its mcpx pin.services.mcpx.package = mcpx;(this repo's ownpkgs/mcpxbuild, kept since the hand-rolled unit) is removed. The service now resolves to the cascade default: the fork'spackages.<system>.mcpx, via the module wrapper'smkDefault— the same derivation the opencode package'sbin/mcpxsymlinks to. The daemon runs the one mcpx everything else already links.mcpxlet binding (line 56) stays: the pin was not its last consumer. It is still used by themcpxKeydeploy key,ExecReload, thehome.activation.mcpxDeployhandover (mcpx upgrade), and t3's PATH. Those keep driving this repo's build as a CLI while the daemon runs the cascade build — both are mcpx 0.1.0 from this repo's source at different pins. Flagged here rather than silently reworked; repointing the handover machinery is a follow-up decision.home/common/mcpx-settings.nixis untouched: it is pure config data (services.mcpx.settings), rendered by the module for whichever package runs — it applies unchanged to the cascade mcpx.2.
pkgs/mcpx/modules/home-manager.nix— new optionservices.mcpx.addPackageToProfile(bool, default true, so no existing consumer's behavior changes). It gates the module'shome.packages = [ cfg.package ]contribution.Why the gate is forced, not optional: with the cascade mcpx as
cfg.package, the profile would contain the mcpx package (realbin/mcpx) and the opencode package whosebin/mcpxis a symlink to that very build — andpkgs.buildEnvcounts the two as conflicting providers of one subpath. Verified in isolation (paths at today's pins):So the profile's
bin/mcpxmust come from the opencode package's link alone, and the mcpx package needs an opt-out. (Under the old pin this same mechanism produced deploy round 2's failure, with the standalone build as the second provider.)Sequencing — why the consumer does not set the new option in this PR
This config's mcpx module arrives through the pin cascade (openchamber
f46050fc→ opencode2d912e02→ itsmcpx-srcpin of this repo), not from this tree. Settingservices.mcpx.addPackageToProfile = falsehere today fails evaluation —The option 'home-manager.users.user.services.mcpx.addPackageToProfile' does not exist— until the pins move. The follow-up PR that bumps this repo's openchamber pin (after a forkmcpx-srcbump and an openchamber opencode bump) adds exactly this line to the sameservices.mcpxblock:That line is written and verified against this branch (see Evidence), so the follow-up is mechanical.
Evidence (laptop amd-6, branch off
22892c316; neither file has drifted on main since)services.mcpx.package=/nix/store/01gdkrm9jvgv1vdxfircc3dilpiv34aa-mcpx-0.1.0(standalone; at the round-2 pin it wasn35r5vj8…). Evaluatedhome.packagesheld it andb6mr9fv22rzajmpbnrib633945gmc1df-opencode-2.0.30+2d912e0.services.mcpx.package=/nix/store/kjk6k9m89ynxnmidcqclg0mr3alimlp6-mcpx-0.1.0— the fork build.readlinkon the opencode package'sbin/mcpxresolves to exactlykjk6k9…/bin/mcpx.buildEnvover[kjk6…-mcpx, b6mr9f…-opencode]fails with thebin/mcpxconflict quoted above — the opt-out is required.addPackageToProfile = falseline, with the chain'smcpx-srcinput overridden to this tree to simulate the cascade):services.mcpx.package= the cascade build (3d05yffv…-mcpx-0.1.0, the fork build of this tree's source); evaluatedhome.packages(455 entries) contains no mcpx package at all — exactly onebin/mcpxprovider remains, the opencode package's link.bin/mcpxfailure is gone from the profile; the build now stops at a separate, pre-existingbin/opencodecollision — this file's consumer wrapper(pkgs.writeShellScriptBin "opencode" …)(wrappinginputs.opencode, pind66c71f5) vs the cascade's opencode package (2d912e02via openchamber). Bothbin/opencodefiles are distinct real files, and both packages are present in unmodified main's evaluatedhome.packages, so the collision pre-dates this change; in deploy round 2 it was masked by thebin/mcpxconflict. Filed separately; it is the remaining blocker for the laptop switch, and it is not this PR's to decide (the wrapper carries the consumer's Cloudflare/Jules env injection and model sync).Refs #5027 — the mcpx half lands here and in the sequenced pin-cascade follow-up.
Open in [code]smith · Need help on this PR? Tag
@codesmith-botwith what you need.