programs.pi-coding-agent.enable
Whether to enable pi-coding-agent.
Type: boolean
Default:
false
Example:
true
Declared by:
programs.pi-coding-agent.package
The pi-coding-agent package to use.
Type: null or package
Default:
pkgs.pi-coding-agent
Declared by:
programs.pi-coding-agent.configDir
Directory holding Pi Coding Agent’s configuration files.
Defaults to ~/.pi/agent, matching the upstream
pi CLI default. The PI_CODING_AGENT_DIR
environment variable is exported automatically whenever the
directory differs from this default so the CLI reads
configuration from the same location.
Type: string
Default:
"${config.home.homeDirectory}/.pi/agent"
Example:
"${config.xdg.configHome}/pi/agent"
Declared by:
programs.pi-coding-agent.context
Global context for Pi Coding Agent.
The value is either:
- Inline content as a string
- A path to a file containing the content
The configured content is written to
AGENTS.md inside
programs.pi-coding-agent.configDir
(default ~/.pi/agent/AGENTS.md).
Type: strings concatenated with “\n” or absolute path
Default:
""
Example:
./pi-context.md
Declared by:
programs.pi-coding-agent.extraPackages
Extra packages available to Pi Coding Agent. These are added to the PATH of the wrapped pi binary.
Needed for packages installed by pi (e.g.
npm:@termdraw/pi requires npm and
bun).
Type: list of package
Default:
[ ]
Example:
[ pkgs.nodejs pkgs.bun ]
Declared by:
programs.pi-coding-agent.keybindings
Keybindings configuration written to
~/.pi/agent/keybindings.json.
See https://pi.dev/docs/latest/keybindings for the
documentation.
Type: JSON value
Default:
{ }
Example:
{
"tui.editor.cursorDown" = [
"down"
"ctrl+n"
];
"tui.editor.cursorUp" = [
"up"
"ctrl+p"
];
"tui.editor.deleteWordBackward" = [
"ctrl+w"
"alt+backspace"
];
}
Declared by:
programs.pi-coding-agent.models
Custom model providers written to
~/.pi/agent/models.json.
Each provider entry may contain baseUrl,
api, apiKey, compat, and a models
list with id, name, reasoning, etc.
See https://pi.dev/docs/latest/models for the documentation.
Type: JSON value
Default:
{ }
Example:
{
providers = {
ollama = {
api = "openai-completions";
apiKey = "ollama";
baseUrl = "http://localhost:11434/v1";
models = [
{
id = "llama3.1:8b";
}
];
};
};
}
Declared by:
programs.pi-coding-agent.settings
Configuration written to
~/.pi/agent/settings.json.
See https://pi.dev/docs/latest/settings for the
documentation.
Type: JSON value
Default:
{ }
Example:
{
compaction = {
enabled = true;
keepRecentTokens = 20000;
reserveTokens = 16384;
};
defaultModel = "claude-sonnet-4-20250514";
defaultProvider = "anthropic";
defaultThinkingLevel = "medium";
enabledModels = [
"claude-*"
"gpt-4o"
];
packages = [
"npm:@termdraw/pi"
"npm:pi-mcp-adapter"
];
retry = {
enabled = true;
maxRetries = 3;
};
theme = "dark";
}
Declared by: