mirror of
https://github.com/lightly-toasted/nix-config.git
synced 2025-10-04 11:35:41 +00:00
feat: replace gemini-cli with opencode
This commit is contained in:
parent
3318d2d14b
commit
362e2f99b1
2 changed files with 3 additions and 34 deletions
|
@ -1,34 +0,0 @@
|
||||||
{ 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"
|
|
||||||
}
|
|
||||||
'';
|
|
||||||
}
|
|
3
home/modules/cli/opencode.nix
Normal file
3
home/modules/cli/opencode.nix
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
{
|
||||||
|
programs.opencode.enable = true;
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue