mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 15:45:39 +00:00
- Switched to github-mcp-server binary instead of npx, since Node.js was removed in commit 58490c36fe
- Added wrapper script for github-mcp-server binary as a workaround
- Updated GitHub PAT key in secrets
34 lines
916 B
Nix
34 lines
916 B
Nix
{ pkgs, config, ... }:
|
|
|
|
let
|
|
# HACK: Gemini CLI did not read settings.json or .env, so export vars in a wrapper script
|
|
wrapped-github-mcp-server = pkgs.writeShellScriptBin "github-mcp-server" ''
|
|
export GITHUB_PERSONAL_ACCESS_TOKEN=$(cat ${config.sops.secrets.github_token.path})
|
|
exec ${pkgs.github-mcp-server}/bin/github-mcp-server "$@"
|
|
'';
|
|
in
|
|
{
|
|
sops.secrets.github_token = { };
|
|
home.packages = with pkgs; [
|
|
gemini-cli
|
|
];
|
|
home.file.".gemini/settings.json".text = ''
|
|
{
|
|
"selectedAuthType": "oauth-personal",
|
|
"mcpServers": {
|
|
"context7": {
|
|
"httpUrl": "https://mcp.context7.com/mcp"
|
|
},
|
|
"github": {
|
|
"command": "${wrapped-github-mcp-server}/bin/github-mcp-server",
|
|
"args": [
|
|
"stdio"
|
|
],
|
|
"timeout": 10000,
|
|
"trust": false
|
|
}
|
|
},
|
|
"preferredEditor": "neovim"
|
|
}
|
|
'';
|
|
}
|