From 9824728ccbd1b0825e7c4b2d151ddb2a71c92cc5 Mon Sep 17 00:00:00 2001 From: Evan Reichard Date: Tue, 12 May 2026 08:41:06 -0400 Subject: [PATCH] feat(pi): add pi-subagents extension --- modules/home/programs/terminal/pi/default.nix | 38 +++++++++++-------- 1 file changed, 22 insertions(+), 16 deletions(-) diff --git a/modules/home/programs/terminal/pi/default.nix b/modules/home/programs/terminal/pi/default.nix index b243f67..5930d88 100755 --- a/modules/home/programs/terminal/pi/default.nix +++ b/modules/home/programs/terminal/pi/default.nix @@ -1,9 +1,8 @@ -{ - lib, - pkgs, - config, - namespace, - ... +{ lib +, pkgs +, config +, namespace +, ... }: let inherit (lib) mkIf; @@ -18,6 +17,7 @@ let # writing other fields (current model, etc.) without us clobbering them. piPackages = [ "https://gitea.va.reichard.io/evan/pi-lsp.git@main" + "https://gitea.va.reichard.io/evan/pi-subagents.git@main" "https://gitea.va.reichard.io/evan/pi-statusline.git@main" ]; @@ -35,15 +35,19 @@ let ]; piAuthJqRawfiles = lib.concatStringsSep " \\\n " ( - map ( - auth: ''--rawfile ${auth.jqVar} "${config.sops.secrets.${auth.secretName}.path}"'' - ) piAuthApiKeys + map + ( + auth: ''--rawfile ${auth.jqVar} "${config.sops.secrets.${auth.secretName}.path}"'' + ) + piAuthApiKeys ); piAuthJqFilter = lib.concatStringsSep " | " ( - map ( - auth: ''.["${auth.provider}"] = { type: "api_key", key: ($'' + auth.jqVar + ''| rtrimstr("\n")) }'' - ) piAuthApiKeys + map + ( + auth: ''.["${auth.provider}"] = { type: "api_key", key: ($'' + auth.jqVar + ''| rtrimstr("\n")) }'' + ) + piAuthApiKeys ); piAuthMergeScript = pkgs.writeShellScript "pi-auth-merge" '' @@ -116,10 +120,12 @@ in }; } // lib.listToAttrs ( - map (auth: { - name = auth.secretName; - value.sopsFile = auth.sopsFile; - }) piAuthApiKeys + map + (auth: { + name = auth.secretName; + value.sopsFile = auth.sopsFile; + }) + piAuthApiKeys ); templates."pi-models.json" = { path = "${config.home.homeDirectory}/.pi/agent/models.json";