pi.nix options

pi.coding-agent.package

The pi coding-agent package to install.

Type: package

Default:

<derivation pi-coding-agent-0.80.6>

pi.coding-agent.environment

Extra environment to set before launching pi.

This can either be a shell environment file that is sourced with set -a, or an attribute set mapping environment variable names to tagged values. { value = string; } exports a literal value, while { file = path; } reads and exports the file at runtime. The latter supports runtime paths provided by secret managers such as sops-nix.

Type: null or absolute path or (open submodule of attribute set of (attribute set containing exactly one of `file` or `value`))

Default:

null

Example:

{
  PI_CODING_AGENT_DIR.value = "/home/user/.pi/agent";
  OPENAI_API_KEY.file = config.sops.secrets.openai-api-key.path;
}

pi.coding-agent.environment.<name>.file

File whose contents are exported at runtime.

Type: string or absolute path

Declared by: - /nix/store/nqmq84hjbj3vx4dzywg75awh97f5rhy9-source/coding-agent/options.nix

pi.coding-agent.environment.<name>.value

Literal value to export.

Type: string

Declared by: - /nix/store/nqmq84hjbj3vx4dzywg75awh97f5rhy9-source/coding-agent/options.nix

pi.coding-agent.environment.PI_CODING_AGENT_DIR

Directory pi uses for its agent configuration. Corresponds to the PI_CODING_AGENT_DIR environment variable.

Type: null or (attribute set containing exactly one of `file` or `value`)

Default:

null

Example:

{ value = "${config.home.homeDirectory}/.pi/agent"; }

pi.coding-agent.environment.PI_CODING_AGENT_DIR.file

File whose contents are exported at runtime.

Type: string or absolute path

Declared by: - /nix/store/nqmq84hjbj3vx4dzywg75awh97f5rhy9-source/coding-agent/options.nix

pi.coding-agent.environment.PI_CODING_AGENT_DIR.value

Literal value to export.

Type: string

Declared by: - /nix/store/nqmq84hjbj3vx4dzywg75awh97f5rhy9-source/coding-agent/options.nix

pi.coding-agent.extensions

Extension paths to pass to pi via repeated --extension flags for every invocation.

Type: list of (absolute path or string)

Default:

[ ]

pi.coding-agent.extraArgs

Extra raw CLI arguments to always append when launching pi.

Type: list of string

Default:

[ ]

Example:

[ "--provider" "openai" "--model" "gpt-5" ]

pi.coding-agent.jail.enable

Whether to enable bubblewrap isolation for pi using jail.nix.

Type: boolean

Default:

false

Example:

true

pi.coding-agent.jail.permissions

Additional permissions passed to jail.nix when wrapping pi. The default allows model API access and mounts the runtime working directory read-write.

Access to pi’s agent configuration directory is always provided separately and does not need to be included here. The jail is supported only on Linux.

Type: function that evaluates to a(n) list of raw value

Default:

combinators: with combinators; [
  network
  mount-cwd
]

Example:

combinators: with combinators; [
  network
  mount-cwd
  (add-pkg-deps [
    pkgs.jq
    pkgs.gnumake
    pkgs.python3
  ])
  (try-readonly (noescape "~/.gitconfig"))
]

pi.coding-agent.models

Path to a pi models.json file to install in pi’s agent configuration directory. This defaults to ~/.pi/agent/models.json and can be overridden with environment.PI_CODING_AGENT_DIR.

Type: null or absolute path

Default:

null

Example:

./models.json

pi.coding-agent.promptTemplates

Prompt template paths to pass to pi via repeated --prompt-template flags for every invocation.

Type: list of absolute path

Default:

[ ]

pi.coding-agent.rules

Extra instructions to append to pi’s system prompt via --append-system-prompt. This can be inline text or a Nix path.

Type: null or strings concatenated with “\n” or absolute path

Default:

null

Example:

./AGENTS.md

pi.coding-agent.settings

Contents of settings.json in pi’s agent configuration directory. The directory can be overridden with environment.PI_CODING_AGENT_DIR.

Type: attribute set

Default:

{ }

pi.coding-agent.skills

Skill paths to pass to pi via repeated --skill flags for every invocation.

Type: list of absolute path

Default:

[ ]

Example:

[
  ./skills/my-skill
  ./skills/nixpkgs
]

pi.coding-agent.themes

Theme paths to pass to pi via repeated --theme flags for every invocation.

Type: list of absolute path

Default:

[ ]