{ config, pkgs, ... }: { # === Pi coding agent configuration === # Managed via home-manager — API keys live here because the flake repo is private. # If you need to move secrets out, create /etc/nixos/pi-secrets.json and source it. home.file.".pi/agent/models.json" = { force = true; text = builtins.toJSON { providers = { openrouter = { baseUrl = "https://openrouter.ai/api/v1"; api = "openai-completions"; apiKey = "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"; }; ollama-cloud = { baseUrl = "https://ollama.com/v1"; api = "openai-completions"; apiKey = "1658177a8be642d8a25783a70116f74f.5St4R7VUOyaeVPW6OEB0GGG0"; compat = { supportsDeveloperRole = false; supportsReasoningEffort = false; }; models = [ { id = "minimax-m3:cloud"; } { id = "kimi-k2.6:cloud"; } { id = "glm-5.1:cloud"; } { id = "gemma4:31b-cloud"; } { id = "devstral-small-2:24b-cloud"; } { id = "devstral-2:123b-cloud"; } { id = "cogito-2.1:671b-cloud"; } { id = "gemini-3-flash-preview:cloud"; } { id = "nematron-3-super:cloud"; } { id = "deepseek-v3.1:671b"; } { id = "deepseek-v3.2"; } { id = "deepseek-v4-flash"; } { id = "deepseek-v4-pro"; } ]; }; }; }; }; home.file.".pi/agent/settings.json" = { force = true; text = builtins.toJSON { defaultProvider = "ollama-cloud"; defaultModel = "minimax-m3:cloud"; packages = [ "npm:pi-subagents" "npm:pi-mcp-adapter" ]; defaultThinkingLevel = "high"; enableInstallTelemetry = false; collapseChangelog = true; quietStartup = true; doubleEscapeAction = "tree"; treeFilterMode = "default"; enabledModels = [ "ollama-cloud/minimax-m3:cloud" "ollama-cloud/deepseek-v4-flash" "ollama-cloud/kimi-k2.6:cloud" "ollama-cloud/glm-5.1:cloud" "ollama-cloud/gemma4:31b-cloud" "ollama-cloud/devstral-small-2:24b-cloud" "ollama-cloud/devstral-2:123b-cloud" "ollama-cloud/cogito-2.1:671b-cloud" "ollama-cloud/gemini-3-flash-preview:cloud" "ollama-cloud/nematron-3-super:cloud" "ollama-cloud/deepseek-v3.1:671b" "ollama-cloud/deepseek-v3.2" ]; }; }; }