This commit is contained in:
Bryan Ramos 2026-04-30 21:43:28 -04:00
parent 9f4e6c6a65
commit 1012029022
7 changed files with 18 additions and 7 deletions

@ -1 +1 @@
Subproject commit 4f129c83b945e8847df798f83a29e554570c6142
Subproject commit b0524fdd3056c7dd951b41f7da410dde37f91a67

View file

@ -4,6 +4,8 @@ with lib;
let
cfg = config.modules.user.pi;
npmGlobal = "${config.home.homeDirectory}/.npm-global";
piVersion = "0.70.5";
in
{ options.modules.user.pi = { enable = mkEnableOption "user.pi"; };
config = mkIf cfg.enable {
@ -24,5 +26,13 @@ in
programs.bash.initExtra = ''
export LLAMACPP_API_KEY=$(cat /run/secrets/LLAMA_API_KEY)
'';
home.activation.installPiCodingAgent = lib.hm.dag.entryAfter [ "writeBoundary" ] ''
PATH="${pkgs.nodejs_20}/bin:$PATH"
run mkdir -p ${npmGlobal}
if ! run ${pkgs.nodejs_20}/bin/npm install -g --prefix ${npmGlobal} @mariozechner/pi-coding-agent@${piVersion}; then
warnEcho "pi-coding-agent install failed (offline or registry error)"
fi
'';
};
}