diff --git a/modules/hm/shell/pi.nix b/modules/hm/shell/pi.nix new file mode 100644 index 0000000..2c363c2 --- /dev/null +++ b/modules/hm/shell/pi.nix @@ -0,0 +1,36 @@ +{ + flake.modules.homeManager.shell = {pkgs, ...}: { + home.file.".pi/agent/auth.json".text = builtins.toJSON { + google = { + type = "api_key"; + key = "!cat /run/secrets/gemini-api-key"; + }; + openrouter = { + type = "api_key"; + key = "!cat /run/secrets/openrouter-api-key"; + }; + opencode-go = { + type = "api_key"; + key = "!cat /run/secrets/opencode-go-api-key"; + }; + zai = { + type = "api_key"; + key = "!cat /run/secrets/zai-coding-plan-api-key"; + }; + }; + + programs.pi-coding-agent = { + enable = true; + package = pkgs.llm-agents.pi; + + settings = { + defaultModel = "glm-5.3-flash"; + defaultProvider = "zai"; + defaultThinkingLevel = "medium"; + theme = "dark"; + }; + }; + + home.packages = with pkgs; [llm-agents.omp]; + }; +} diff --git a/modules/hosts/arcturus/config.nix b/modules/hosts/arcturus/config.nix index 696e65a..1fe2f92 100644 --- a/modules/hosts/arcturus/config.nix +++ b/modules/hosts/arcturus/config.nix @@ -31,6 +31,9 @@ ".local/share/zsh" ".local/share/zoxide" ".local/state/lazygit" + + ".pi/agent/sessions" + ".omp" ]; files = [ diff --git a/modules/hosts/canopus/config.nix b/modules/hosts/canopus/config.nix index ae61219..28fc8d9 100644 --- a/modules/hosts/canopus/config.nix +++ b/modules/hosts/canopus/config.nix @@ -59,6 +59,8 @@ ".config/orca" ".zcode" ".config/ZCode" + ".pi/agent/sessions" + ".omp" ]; files = [ diff --git a/modules/hosts/sirius/config.nix b/modules/hosts/sirius/config.nix index 9a15c14..1718f10 100644 --- a/modules/hosts/sirius/config.nix +++ b/modules/hosts/sirius/config.nix @@ -59,6 +59,8 @@ ".config/orca" ".zcode" ".config/ZCode" + ".pi/agent/sessions" + ".omp" ]; files = [