feat(pi): install the coding agent for a side-by-side trial (task 0020)

Add a `pi` module that turns on the home-manager `programs.pi-coding-agent`
integration for the primary user and freezes a single settings.json: the
default provider set to Anthropic, the default model to Opus (claude-opus-4-8,
Pi's own catalogue id), and analytics disabled. Everything else in
~/.pi/agent — the credential and all self-modification state — is left
unmanaged, so login survives rebuilds and backing Pi out is a one-line enable
flip. Enabled on neogaia alone.
This commit was merged in pull request #12.
This commit is contained in:
2026-07-21 19:29:15 -04:00
parent 6f34c95c51
commit fc3380f8ce
4 changed files with 133 additions and 0 deletions

29
modules/pi/pi.nix Normal file
View File

@@ -0,0 +1,29 @@
{
config,
lib,
...
}:
# Pi, a terminal coding agent, for the primary user, configured through
# home-manager, which ships the package and manages ~/.pi/agent.
# The login credential is left unmanaged, so it survives rebuilds.
let
cfg = config.modules.pi;
user = config.user.name;
in
{
options.modules.pi.enable = lib.mkEnableOption ''
Pi, a terminal coding agent, configured via home-manager'';
config = lib.mkIf cfg.enable {
home-manager.users.${user}.programs.pi-coding-agent = {
enable = true;
settings = {
defaultProvider = "anthropic";
# Pi's catalogue id for Opus.
defaultModel = "claude-opus-4-8";
enableAnalytics = false;
};
};
};
}