Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 6 additions & 3 deletions home/common/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -916,9 +916,12 @@ in
services.mcpx = {
# enable comes from the cascade (mkDefault at each layer).
#
# This repo's own mcpx build — the package the hand-rolled unit
# ran (pkgs/mcpx) — rather than the fork's re-export default.
package = mcpx;
# package: deliberately unset. There is one mcpx — the
# cascade's (the fork's build, via the module wrapper's
# mkDefault) — and this config takes that one (Drew's ruling,
# 2026-11-03; code#5027). The former pin to this repo's own
# pkgs/mcpx build made two mcpx builds coexist and collided
# with the fork package's bin/mcpx in the home profile.
# The daemon's environment, unchanged from the hand-rolled unit
# (mcpxEnvironment above).
environment = mcpxEnvironment;
Expand Down
17 changes: 16 additions & 1 deletion pkgs/mcpx/modules/home-manager.nix
Original file line number Diff line number Diff line change
Expand Up @@ -26,10 +26,25 @@ in
{
imports = [ ./common.nix ];

options.services.mcpx.addPackageToProfile = lib.mkOption {
type = lib.types.bool;
default = true;
description = ''
Whether the module adds `package` to `home.packages`, putting
`bin/mcpx` on the profile PATH. Turn it off when another
package in the profile already provides `bin/mcpx` — the fork
opencode package's `bin/mcpx` is a link to this very build, and
home-manager's buildEnv still counts the package and the link
as two providers of the same path (code#5027). The daemon is
unaffected either way: the service definition runs `package`
directly, never through the profile.
'';
};

config = lib.mkIf cfg.enable (
lib.mkMerge [
{
home.packages = [ cfg.package ];
home.packages = lib.mkIf cfg.addPackageToProfile [ cfg.package ];

# Point every other mcpx client at the same config the
# daemon runs, two ways: MCPX_CONFIG in the session
Expand Down
Loading