feat: add opencode

This commit is contained in:
2025-12-10 13:51:05 -05:00
parent c1a650a90e
commit a367f724ce
2 changed files with 57 additions and 1 deletions

View File

@@ -22,6 +22,7 @@ in
};
terminal = {
opencode = enabled;
btop = enabled;
direnv = enabled;
git = enabled;
@@ -43,7 +44,6 @@ in
texliveSmall # Pandoc PDF Dep
google-cloud-sdk
tldr
opencode
claude-code
reichard.qwen-code
];

View File

@@ -0,0 +1,56 @@
{ lib
, config
, namespace
, ...
}:
let
inherit (lib) mkIf;
cfg = config.${namespace}.programs.terminal.opencode;
in
{
options.${namespace}.programs.terminal.opencode = {
enable = lib.mkEnableOption "enable opencode";
};
config = mkIf cfg.enable {
programs.opencode = {
enable = true;
enableMcpIntegration = true;
settings = {
theme = "catppuccin";
provider = {
"llama-swap" = {
npm = "@ai-sdk/openai-compatible";
options = {
baseURL = "https://llm-api.va.reichard.io/v1";
};
models = {
"gpt-oss-20b-thinking" = {
name = "GPT OSS (20B)";
};
qwen3-coder-30b-instruct = {
name = "Qwen3 Coder (30B)";
};
qwen3-30b-2507-thinking = {
name = "Qwen3 2507 (30B) Thinking";
};
qwen3-30b-2507-instruct = {
name = "Qwen3 2507 (30B) Instruct";
};
};
};
};
mcp = {
gopls = {
type = "local";
command = [
"gopls"
"mcp"
];
enabled = true;
};
};
};
};
};
}