Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

programs.crush.enable

Whether to enable Crush, Charm’s coding agent for the terminal.

Type: boolean

Default:

false

Example:

true

Declared by:

programs.crush.enableMcpIntegration

Whether to integrate the MCP servers config from programs.mcp.servers into programs.crush.settings.mcp.

Note: Settings defined in programs.mcp.servers are merged with programs.crush.settings.mcp, with Crush settings taking precedence.

Type: boolean

Default:

false

Declared by:

programs.crush.package

The crush package to use.

Type: null or package

Default:

pkgs.crush

Declared by:

programs.crush.settings

Configuration written to $XDG_CONFIG_HOME/crush/crush.json. See https://github.com/charmbracelet/crush for the documentation.

Crush expands $VAR and $(command) in configuration values, so secrets can be read at startup instead of being written to the Nix store.

Note, "$schema": "https://charm.land/crush.json" is automatically added to the configuration.

Type: JSON value

Default:

{ }

Example:

{
  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";
      }
    ];
  };
  lsp.nix.command = "nil";
  options.disabled_tools = [ "sourcegraph" ];
  permissions.allowed_tools = [ "view" ];
}

Declared by:

programs.crush.skills

Agent Skills for Crush.

This option can be either:

  • An attribute set defining skills
  • A path to a directory containing skill folders

If an attribute set is used, the attribute name becomes the skill directory name, and the value is either:

  • Inline content as a string (creates crush/skills/<name>/SKILL.md)
  • A path to a file (creates crush/skills/<name>/SKILL.md)
  • A path to a directory (creates crush/skills/<name>/ with all files)

This also accepts Nix store paths, for example a skill directory from a package.

If a path is used, it is expected to contain one folder per skill name, each containing a SKILL.md. The directory is symlinked to $XDG_CONFIG_HOME/crush/skills/.

Type: (attribute set of (strings concatenated with “\n” or absolute path or string)) or absolute path

Default:

{ }

Example:

{
  git-release = ''
    ---
    name: git-release
    description: Create consistent releases and changelogs
    ---

    ## What I do

    - Draft release notes from merged PRs
    - Propose a version bump
  '';

  # A skill can also be a directory containing SKILL.md and other files.
  data-analysis = ./skills/data-analysis;
}

Declared by: