refactor(opencode): simplify configuration for provider API keys

This commit is contained in:
tux
2026-05-10 04:29:59 +05:30
parent d15933bf05
commit ee82aa373e

View File

@@ -1,10 +1,5 @@
{ {
flake.modules.homeManager.shell = flake.modules.homeManager.shell = {
{
osConfig ? { },
...
}:
{
programs.opencode = { programs.opencode = {
enable = true; enable = true;
tui = { tui = {
@@ -14,17 +9,17 @@
provider = { provider = {
google = { google = {
options = { options = {
apiKey = "{file:${osConfig.sops.secrets.gemini-api-key.path}}"; apiKey = "{file:/run/secrets/gemini-api-key}";
}; };
}; };
openrouter = { openrouter = {
options = { options = {
apiKey = "{file:${osConfig.sops.secrets.openrouter-api-key.path}}"; apiKey = "{file:/run/secrets/openrouter-api-key}";
}; };
}; };
opencode-go = { opencode-go = {
options = { options = {
apiKey = "{file:${osConfig.sops.secrets.opencode-go-api-key.path}}"; apiKey = "{file:/run/secrets/opencode-go-api-key}";
}; };
}; };
}; };