Restore the pre-update Pi packaging and Rofi option from PR 124 after the associated deployment exposed a performance regression.
Refs: 1b4dc7762
47 lines
1.3 KiB
Nix
47 lines
1.3 KiB
Nix
{
|
|
config,
|
|
lib,
|
|
pkgs,
|
|
...
|
|
}:
|
|
# Pi, a terminal coding agent, for the primary user, configured through
|
|
# home-manager, which ships the package and manages global settings.
|
|
# The login credential is left unmanaged, so it survives rebuilds.
|
|
let
|
|
user = config.user.name;
|
|
piDir = "${config.users.users.${user}.home}/.pi/agent";
|
|
in
|
|
{
|
|
options.modules.shell.pi = {
|
|
enable = lib.mkEnableOption "Pi, a terminal coding agent, configured through home-manager";
|
|
};
|
|
|
|
config = lib.mkIf config.modules.shell.pi.enable {
|
|
home-manager.users.${user} = {
|
|
programs.pi-coding-agent = {
|
|
enable = true;
|
|
package = pkgs.pi-coding-agent.overrideAttrs {
|
|
src = ../../../../../third_party/pi;
|
|
patches = [ ];
|
|
};
|
|
|
|
settings = {
|
|
defaultProvider = "openai-codex";
|
|
defaultModel = "gpt-5.6-terra";
|
|
defaultThinkingLevel = "medium";
|
|
theme = "dark";
|
|
enableInstallTelemetry = false;
|
|
enableAnalytics = false;
|
|
terminal.clearOnShrink = true;
|
|
};
|
|
};
|
|
|
|
home.file = {
|
|
# The first declarative rollout replaces the interactive settings file.
|
|
# Login state stays in auth.json, which this module does not manage.
|
|
"${piDir}/settings.json".force = true;
|
|
};
|
|
};
|
|
};
|
|
}
|