My pi agent setup, for now personal. Will make more general later once working how i want
  • Nix 64.9%
  • TypeScript 35.1%
Find a file
Chris Toph 550953c68c fix(pi): pin claude bridge to llm-agents Claude Code
- split package set into modules/home/packages/
- import Claude Code from llm-agents for AskClaude
- patch pi-claude-bridge with explicit executable path
2026-05-04 15:59:51 -04:00
locks feat(pi): add bun2nix packages and RTK 2026-05-04 04:34:22 -04:00
modules/home fix(pi): pin claude bridge to llm-agents Claude Code 2026-05-04 15:59:51 -04:00
flake.lock feat(pi): add bun2nix packages and RTK 2026-05-04 04:34:22 -04:00
flake.nix fix(pi): pin claude bridge to llm-agents Claude Code 2026-05-04 15:59:51 -04:00
README.md feat(pi): add bun2nix packages and RTK 2026-05-04 04:34:22 -04:00

pi.nix

Home Manager module for Pi coding agent package, config, local extensions, RTK, and third-party Pi packages.

Use

Add flake input:

{
  inputs.pi-nix.url = "git+file:///repo/Nix/pi.nix";
}

Import module in Home Manager:

{
  imports = [ inputs.pi-nix.homeManagerModules.default ];

  programs.pi = {
    enable = true;
    provider = "google-gemini-cli";
    model = "gemini-3.1-pro-preview";
  };
}

programs.pi.package defaults to pi-nix's pinned llm-agents Pi package.

NPM isolation

No global npm install. Heavy packages build inside Nix:

  • pi-claude-bridge: buildNpmPackage from tagged source with upstream package-lock.json
  • pi-web-access: buildNpmPackage with locked package-lock.json
  • context-mode: bun2nix dependencies, then Bun-driven Nix build with no npm shellout

Pi loads resulting store paths through settings.json packages, so dependencies stay package-local. The module also installs rtk for pi-rtk-optimizer command rewrites.