Add MCP to Nix packages and wire agent to Nix-managed binary

- Add mcp flake input (git+ssh://git@git.wntrmute.dev/mc/mcp.git)
- Add mcp CLI to mcpkg.nix system packages (installed on all machines)
- Update mcp.nix to use Nix-managed mcp-agent binary path instead of
  hardcoded /usr/local/bin/mcp-agent

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
2026-03-26 22:48:40 -07:00
parent 67ced96f4d
commit baf09e8b1f
3 changed files with 6 additions and 2 deletions

View File

@@ -2,7 +2,7 @@
# #
# Creates a dedicated 'mcp' system user with rootless podman support # Creates a dedicated 'mcp' system user with rootless podman support
# and a systemd service for the agent daemon. # and a systemd service for the agent daemon.
{ pkgs, ... }: { pkgs, inputs, ... }:
let let
mcpUid = 995; mcpUid = 995;
@@ -29,7 +29,7 @@ in
serviceConfig = { serviceConfig = {
Type = "simple"; Type = "simple";
ExecStart = "/usr/local/bin/mcp-agent server --config /srv/mcp/mcp-agent.toml"; ExecStart = "${inputs.mcp.packages.x86_64-linux.mcp-agent}/bin/mcp-agent server --config /srv/mcp/mcp-agent.toml";
Restart = "on-failure"; Restart = "on-failure";
RestartSec = 5; RestartSec = 5;

View File

@@ -6,5 +6,6 @@
inputs.mcr.packages.x86_64-linux.default inputs.mcr.packages.x86_64-linux.default
inputs.mc-proxy.packages.x86_64-linux.default inputs.mc-proxy.packages.x86_64-linux.default
inputs.mcdeploy.packages.x86_64-linux.default inputs.mcdeploy.packages.x86_64-linux.default
inputs.mcp.packages.x86_64-linux.default
]; ];
} }

View File

@@ -43,6 +43,9 @@
mcdeploy.url = "git+https://git@git.wntrmute.dev/kyle/mcdeploy"; mcdeploy.url = "git+https://git@git.wntrmute.dev/kyle/mcdeploy";
mcdeploy.inputs.nixpkgs.follows = "nixpkgs"; mcdeploy.inputs.nixpkgs.follows = "nixpkgs";
mcp.url = "git+ssh://git@git.wntrmute.dev/mc/mcp.git";
mcp.inputs.nixpkgs.follows = "nixpkgs";
# exo.url = "git+https://git.wntrmute.dev/kyle/exo"; # exo.url = "git+https://git.wntrmute.dev/kyle/exo";
# exo.inputs.nixpkgs.follows = "nixpkgs"; # exo.inputs.nixpkgs.follows = "nixpkgs";