Add pi coding agent tool + settings
- package pi-coding-agent with a vendored lockfile
- add pi to toolchain and expose settings file via tmpfiles
- seed pi defaults to match local model choices
Tests: nix build --no-link --impure --expr 'let pkgs = import <nixpkgs> {}; in pkgs.callPackage ./nix/tools/pi-coding-agent.nix {}'
This commit is contained in:
parent
77b2cef22f
commit
8a1deeed09
9
clawdinator/pi-settings.json
Normal file
9
clawdinator/pi-settings.json
Normal file
@ -0,0 +1,9 @@
|
||||
{
|
||||
"defaultProvider": "openai-codex",
|
||||
"defaultModel": "gpt-5.2-codex",
|
||||
"defaultThinkingLevel": "xhigh",
|
||||
"enabledModels": [
|
||||
"openai-codex/gpt-5.2-codex",
|
||||
"anthropic/claude-opus-4-5"
|
||||
]
|
||||
}
|
||||
@ -523,6 +523,10 @@ in
|
||||
- **clawdinator-gh-refresh** — mint GitHub App token + refresh GH auth (no sudo).
|
||||
'';
|
||||
};
|
||||
environment.etc."clawdinator/pi-settings.json" = {
|
||||
mode = "0644";
|
||||
source = ../../clawdinator/pi-settings.json;
|
||||
};
|
||||
environment.etc."stunnel/efs.conf" = lib.mkIf cfg.memoryEfs.enable {
|
||||
mode = "0644";
|
||||
text = ''
|
||||
@ -578,6 +582,9 @@ in
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d ${cfg.stateDir} 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.stateDir}/.pi 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${cfg.stateDir}/.pi/agent 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"L+ ${cfg.stateDir}/.pi/agent/settings.json - - - - /etc/clawdinator/pi-settings.json"
|
||||
"d ${workspaceDir} 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${logDir} 0750 ${cfg.user} ${cfg.group} - -"
|
||||
"d ${ghConfigDir} 0750 ${cfg.user} ${cfg.group} - -"
|
||||
|
||||
@ -1,4 +1,7 @@
|
||||
{ pkgs }:
|
||||
let
|
||||
piCodingAgent = pkgs.callPackage ./pi-coding-agent.nix {};
|
||||
in
|
||||
{
|
||||
packages = [
|
||||
pkgs.bash
|
||||
@ -11,6 +14,7 @@
|
||||
pkgs.ripgrep
|
||||
pkgs.nodejs_22
|
||||
pkgs.pnpm_10
|
||||
piCodingAgent
|
||||
pkgs.util-linux
|
||||
pkgs.nfs-utils
|
||||
pkgs.stunnel
|
||||
@ -22,6 +26,7 @@
|
||||
{ name = "bash"; description = "Shell runtime for CLAWDINATOR scripts."; }
|
||||
{ name = "gh"; description = "GitHub CLI for repo + PR inventory."; }
|
||||
{ name = "openclaw-gateway"; description = "CLAWDINATOR runtime (Clawbot gateway)."; }
|
||||
{ name = "pi"; description = "Pi coding agent CLI."; }
|
||||
{ name = "git"; description = "Repo sync + ops."; }
|
||||
{ name = "curl"; description = "HTTP requests."; }
|
||||
{ name = "jq"; description = "JSON processing."; }
|
||||
|
||||
17
nix/tools/pi-coding-agent.nix
Normal file
17
nix/tools/pi-coding-agent.nix
Normal file
@ -0,0 +1,17 @@
|
||||
{ pkgs }:
|
||||
pkgs.buildNpmPackage {
|
||||
pname = "pi-coding-agent";
|
||||
version = "0.50.1";
|
||||
|
||||
src = pkgs.fetchurl {
|
||||
url = "https://registry.npmjs.org/@mariozechner/pi-coding-agent/-/pi-coding-agent-0.50.1.tgz";
|
||||
hash = "sha256-39tkNCz+h0CjvkAjnWJELsMpeg9HCr4S+y3teNQP8A8=";
|
||||
};
|
||||
|
||||
postPatch = ''
|
||||
cp ${../vendor/pi-coding-agent/package-lock.json} package-lock.json
|
||||
'';
|
||||
|
||||
npmDepsHash = "sha256-xCHoy5xKeUl/ouowPqyHVlq/zjNTPygxy9af8jItC/w=";
|
||||
dontNpmBuild = true;
|
||||
}
|
||||
5962
nix/vendor/pi-coding-agent/package-lock.json
generated
vendored
Normal file
5962
nix/vendor/pi-coding-agent/package-lock.json
generated
vendored
Normal file
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user