mirror of
https://github.com/nix-community/home-manager.git
synced 2026-10-03 12:09:19 +00:00
Add a module for Crush, Charm's coding agent for the terminal. The module installs the package, writes the JSON configuration to $XDG_CONFIG_HOME/crush/crush.json, and manages Agent Skills either from an attribute set or from a directory. With `enableMcpIntegration` it also takes the MCP servers from the shared `programs.mcp` module. Co-authored-by: Rane <rane+git@junkyard.systems>
53 lines
1.1 KiB
Nix
53 lines
1.1 KiB
Nix
{
|
|
programs.mcp = {
|
|
enable = true;
|
|
servers = {
|
|
everything = {
|
|
command = "npx";
|
|
args = [
|
|
"-y"
|
|
"@modelcontextprotocol/server-everything"
|
|
];
|
|
env.NPM_TOKEN.file = "/run/secrets/npm-token";
|
|
};
|
|
context7 = {
|
|
url = "https://mcp.context7.com/mcp";
|
|
headers.CONTEXT7_API_KEY = "$CONTEXT7_API_KEY";
|
|
};
|
|
disabled-server = {
|
|
command = "echo";
|
|
args = [ "test" ];
|
|
enabled = false;
|
|
};
|
|
filesystem = {
|
|
command = "npx";
|
|
args = [
|
|
"-y"
|
|
"@modelcontextprotocol/server-filesystem"
|
|
"/other-tmp"
|
|
];
|
|
};
|
|
};
|
|
};
|
|
|
|
programs.crush = {
|
|
enable = true;
|
|
package = null;
|
|
enableMcpIntegration = true;
|
|
|
|
settings.mcp.filesystem = {
|
|
type = "stdio";
|
|
command = "npx";
|
|
args = [
|
|
"-y"
|
|
"@modelcontextprotocol/server-filesystem"
|
|
"/tmp"
|
|
];
|
|
};
|
|
};
|
|
|
|
nmt.script = ''
|
|
assertFileContent home-files/.config/crush/crush.json ${./mcp-integration.json}
|
|
'';
|
|
}
|