Files
home-manager/tests/modules/programs/crush/settings.nix
Vidhan Bhatt 44a1a0ab16 crush: add module
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>
2026-08-05 10:43:29 -05:00

57 lines
1.2 KiB
Nix

{ config, ... }:
{
programs.crush = {
enable = true;
package = config.lib.test.mkStubPackage { };
settings = {
models.large = {
model = "claude-sonnet-4-20250514";
provider = "anthropic";
};
providers.deepseek = {
type = "openai-compat";
base_url = "https://api.deepseek.com/v1";
api_key = "$(cat /run/secrets/deepseek-api-key)";
models = [
{
id = "deepseek-chat";
name = "Deepseek V3";
context_window = 64000;
}
];
};
lsp = {
nix.command = "nil";
go = {
command = "gopls";
env.GOTOOLCHAIN = "go1.24.5";
};
};
mcp.filesystem = {
type = "stdio";
command = "npx";
args = [
"-y"
"@modelcontextprotocol/server-filesystem"
"/tmp"
];
};
options = {
disabled_tools = [ "sourcegraph" ];
initialize_as = "AGENTS.md";
};
permissions.allowed_tools = [ "view" ];
};
};
nmt.script = ''
assertFileContent home-files/.config/crush/crush.json ${./crush.json}
'';
}