feat(opencode): add mcp servers

This commit is contained in:
toast 2025-10-08 14:38:18 +09:00
parent f715f0994c
commit 6cb9cd60b2
3 changed files with 43 additions and 5 deletions

View file

@ -1,3 +1,41 @@
{ config, ... }:
{
programs.opencode.enable = true;
sops.secrets = {
"openrouter_api_key" = {};
"github_token" = {};
"context7_api_key" = {};
};
programs.opencode = {
enable = true;
settings = {
theme = "opencode";
provider = {
openrouter = {
options = {
apiKey = "{file:${config.sops.secrets."openrouter_api_key".path}}";
};
};
};
mcp = {
github = {
enabled = true;
type = "remote";
url = "https://api.githubcopilot.com/mcp/";
headers = {
Authorization = "Bearer {file:${config.sops.secrets."github_token".path}}";
};
};
context7 = {
enabled = true;
type = "remote";
url = "https://mcp.context7.com/mcp";
headers = {
"CONTEXT7_API_KEY" = "{file:${config.sops.secrets."context7_api_key".path}}";
};
};
};
};
};
}

View file

@ -5,6 +5,4 @@
sops.defaultSopsFormat = "yaml";
sops.age.keyFile = "/home/toast/.config/sops/age/keys.txt";
sops.secrets."tailscale/authkey" = { };
}