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 is contained in:
28
modules/pi/pi.nix
Normal file
28
modules/pi/pi.nix
Normal file
@@ -0,0 +1,28 @@
|
||||
{
|
||||
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;
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
Reference in New Issue
Block a user