Skip to content

mcpx: the daemon modules originate here (pkgs/mcpx/modules + flake outputs) - #4812

Merged
dezren39 merged 7 commits into
mainfrom
mcpx-daemon-modules
Nov 3, 2026
Merged

dezren39 merged 7 commits into
mainfrom
mcpx-daemon-modules

Conversation

@dezren39

@dezren39 dezren39 commented Nov 3, 2026 •

Copy link
Copy Markdown
Member

Step 2a of the mcpx consolidation (code#4801; Drew's layering, 2026-11-03: the daemon mode originates with mcpx, the opencode fork re-exports it — opencode#1502 — openchamber passes it through, dezren39/nix consumes it via the one input — nix#1384).

What lands here:

  • pkgs/mcpx/modules/{common,nixos,home-manager}.nix — faithful ports of dezren39/nix's modules/mcpx (the services.mcpx option set is unchanged: enable, package, settings, servers, environment, environmentFile, configFile), headers reframed to their canonical home.
  • pkgs/mcpx/modules/darwin.nix — NEW nix-darwin module, ported from the hand-rolled agent in dezren39/nix's configuration.nix: launchd user agent on the fixed path /usr/local/libexec/mcpx/mcpx (plist stability across mcpx builds), a wrapper that stops any squatter on the config's socket before exec'ing the daemon, the activation refresh + kickstart-on-change, ExitTimeOut 20, logs under ~/Library/Logs. Deliberately dropped: that repo's service-events hook (a local embellishment) and its hand-written user config — the module uses the rendered configFile + MCPX_CONFIG like the other platforms, so every platform computes the same daemon socket. Note the known divergence this surfaces: the home-manager darwin branch points launchd straight at the store path; aligning it with the fixed-path behavior is a follow-up decision, flagged in its header.
  • lib/default.nix + flake.nix: a make-mcpx-modules contribution beside make-mcpx-overlay, exposing nixosModules.mcpx / homeManagerModules.mcpx / darwinModules.mcpx, each wrapping the canonical files with this flake's own mcpx build as the package default (the pattern every layer repeats with its own build).

Verification: all files parse (nix-instantiate --parse); standalone eval of each module against its module system (NixOS systemd unit, home-manager on Linux + darwin branches, nix-darwin agent + activation scripts) is being run on the laptop and will be reported on this PR before merge.


Autofix with [code]smith
Open in [code]smith · Need help on this PR? Tag @codesmith-bot with what you need.

@dezren39
dezren39 requested a review from a team as a code owner November 3, 2026 09:00
@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ⚠️ Failed 2026-11-03T09:00:59.818811Z
We couldn’t complete this review. Comment @codex review to try again.
8c66f6f PR opened
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.
To continue using code reviews, you can upgrade your account or add credits to your account and enable them for code reviews in your settings.

@coderabbitai

coderabbitai Bot commented Nov 3, 2026 •

Copy link
Copy Markdown

Warning

Review limit reached

You've used all free OSS reviews for now. Wait for the free limit to reset to keep reviewing this public repository.

Next included review available in 6 minutes.

Check out review usage here.

View limit details

Limit details: You’ve used the included review currently available.

Learn how review limits work.

Review configuration:

Run configuration
  • Source mode: Auto
  • Repository: Unavailable
  • Branch: Unavailable
  • File: No configuration file from this repository applied
  • Commit: Unavailable
  • Layers: defaults
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 45483a58-b8be-48bf-8bf5-47987e611968
Commits

Reviewing files that changed from the base of the PR and between 627e26d and 5125651.

Files selected for processing: 6
  • flake.nix
  • lib/default.nix
  • pkgs/mcpx/modules/common.nix
  • pkgs/mcpx/modules/darwin.nix
  • pkgs/mcpx/modules/home-manager.nix
  • pkgs/mcpx/modules/nixos.nix
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

Share

CodeRabbit Verify

  • Run CodeRabbit Verify to test the changes in this pull request.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Eval verification (laptop): the NixOS module, both home-manager branches, and the flake wiring all pass with the expected rendered values. The nix-darwin module had exactly one defect, now fixed in the latest commit: it assigned the configFile derivation directly to launchd.user.envVariables.MCPX_CONFIG, but nix-darwin types that option as a plain string with no derivation coercion (the NixOS/HM sessionVariables options do coerce, which is why the identical assignment passes there). Fixed by interpolating the path, with a comment saying why. Every other darwin assertion already verified: fixed-path ProgramArguments [/usr/local/libexec/mcpx/mcpx], ExitTimeOut 20, WorkingDirectory from primaryUser, the activation install refresh, and the postActivation kickstart. A re-run of just the darwin eval is confirming the fix before merge.

@dezren39

dezren39 commented Nov 3, 2026

Copy link
Copy Markdown
Member Author

Eval verification complete (laptop): NixOS module, home-manager Linux + darwin branches, and the flake wiring all pass; the darwin module's one defect (envVariables string coercion) is fixed and its re-eval passes — MCPX_CONFIG now renders as the config store path string, ProgramArguments on the fixed path, ExitTimeOut 20. Merging. Step 2a of #4801 lands here; the fork re-export (#1502) and openchamber pass-through follow.

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