From 03df8320e2bed9810dd2ed88c0102702a9f9dd5a Mon Sep 17 00:00:00 2001 From: Spencer Gilbert Date: Fri, 25 Sep 2026 11:59:49 -0400 Subject: [PATCH] [pi] Replace os() templates with per-platform copied configs --- mise.linux.toml | 2 ++ mise.macos.toml | 2 ++ mise.toml | 2 -- pi/{auth.json => auth.linux.json} | 11 ----------- pi/auth.macos.json | 16 ++++++++++++++++ pi/{settings.json => settings.linux.json} | 6 ------ pi/settings.macos.json | 20 ++++++++++++++++++++ 7 files changed, 40 insertions(+), 19 deletions(-) rename pi/{auth.json => auth.linux.json} (57%) create mode 100644 pi/auth.macos.json rename pi/{settings.json => settings.linux.json} (76%) create mode 100644 pi/settings.macos.json diff --git a/mise.linux.toml b/mise.linux.toml index 9416314..ffaaffa 100644 --- a/mise.linux.toml +++ b/mise.linux.toml @@ -11,4 +11,6 @@ run = "mise run setup-dnf-repos" [dotfiles] "~/.config/mise/config.linux.toml" = "mise.linux.toml" +"~/.config/pi/auth.json" = { source = "pi/auth.linux.json", mode = "copy" } +"~/.config/pi/settings.json" = { source = "pi/settings.linux.json", mode = "copy" } "~/.ssh/authorized_keys" = { source = "ssh/authorized_keys" } diff --git a/mise.macos.toml b/mise.macos.toml index ed0c296..0d7ab29 100644 --- a/mise.macos.toml +++ b/mise.macos.toml @@ -15,6 +15,8 @@ "~/.config/claude/settings.json" = { source = "claude/settings.json", mode = "copy" } "~/.config/codex/AGENTS.md" = { source = "shared/AGENTS.md" } "~/.config/mise/config.macos.toml" = "mise.macos.toml" +"~/.config/pi/auth.json" = { source = "pi/auth.macos.json", mode = "copy" } +"~/.config/pi/settings.json" = { source = "pi/settings.macos.json", mode = "copy" } [tools] claude = "latest" diff --git a/mise.toml b/mise.toml index 0432752..21cfc70 100644 --- a/mise.toml +++ b/mise.toml @@ -26,9 +26,7 @@ run = "mise run configure-forge-remotes" "~/.config/mise/miserc.toml" = ".miserc.toml" "~/.config/nvim/" = "nvim/" "~/.config/pi/AGENTS.md" = { source = "shared/AGENTS.md" } -"~/.config/pi/auth.json" = { source = "pi/auth.json", mode = "template" } "~/.config/pi/models.json" = { source = "pi/models.json" } -"~/.config/pi/settings.json" = { source = "pi/settings.json", mode = "template" } "~/.local/bin/" = { source = "bin/", mode = "symlink-each" } "~/.ssh/conf.d/" = { source = "ssh/conf.d/", mode = "symlink-each" } "~/.ssh/config/include" = { line = "Include conf.d/*.conf" } diff --git a/pi/auth.json b/pi/auth.linux.json similarity index 57% rename from pi/auth.json rename to pi/auth.linux.json index d3adfd0..2f8fdb8 100644 --- a/pi/auth.json +++ b/pi/auth.linux.json @@ -5,16 +5,6 @@ "LLAMA_BASE_URL": "http://desktop:9931" } }, -{%- if os() == "macos" %} - "anthropic": { - "type": "api_key", - "key": "!op read 'op://Employee/Pi/anthropic'" - }, - "openai": { - "type": "api_key", - "key": "!op read 'op://Employee/Pi/openai'" - } -{%- else %} "opencode-go": { "type": "api_key", "key": "!op read 'op://Private/Pi/opencode-go'" @@ -23,5 +13,4 @@ "type": "api_key", "key": "!op read 'op://Private/Pi/qwen-token-plan'" } -{%- endif %} } diff --git a/pi/auth.macos.json b/pi/auth.macos.json new file mode 100644 index 0000000..68b943c --- /dev/null +++ b/pi/auth.macos.json @@ -0,0 +1,16 @@ +{ + "llama.cpp": { + "type": "api_key", + "env": { + "LLAMA_BASE_URL": "http://desktop:9931" + } + }, + "anthropic": { + "type": "api_key", + "key": "!op read 'op://Employee/Pi/anthropic'" + }, + "openai": { + "type": "api_key", + "key": "!op read 'op://Employee/Pi/openai'" + } +} diff --git a/pi/settings.json b/pi/settings.linux.json similarity index 76% rename from pi/settings.json rename to pi/settings.linux.json index 11e05e9..5925795 100644 --- a/pi/settings.json +++ b/pi/settings.linux.json @@ -3,18 +3,12 @@ "theme": "catppuccin-frappe", "quietStartup": true, "defaultThinkingLevel": "medium", -{%- if os() == "macos" %} - "defaultProvider": "openai", - "defaultModel": "gpt-5.6-sol", - "enabledModels": [], -{%- else %} "defaultProvider": "qwen-token-plan", "defaultModel": "qwen3.8-flash", "enabledModels": [ "opencode-go/**", "qwen-token-plan/**" ], -{%- endif %} "packages": [ "https://tangled.org/spencergilbert.dev/pi-pkg" ], diff --git a/pi/settings.macos.json b/pi/settings.macos.json new file mode 100644 index 0000000..41437fc --- /dev/null +++ b/pi/settings.macos.json @@ -0,0 +1,20 @@ +{ + "externalEditor": "nvim", + "theme": "catppuccin-frappe", + "quietStartup": true, + "defaultThinkingLevel": "medium", + "defaultProvider": "openai", + "defaultModel": "gpt-5.6-sol", + "enabledModels": [], + "packages": [ + "https://tangled.org/spencergilbert.dev/pi-pkg" + ], + "showCacheMissNotices": true, + "npmCommand": [ + "mise", + "exec", + "node@lts", + "--", + "npm" + ] +} -- 2.51.2