Files
AZ-NIX/home/features/coding/opencode.nix
2026-03-16 07:47:22 +01:00

144 lines
3.6 KiB
Nix

{inputs, ...}: {
xdg.configFile = {
"opencode/commands" = {
source = "${inputs.agents}/commands";
recursive = true;
};
"opencode/context" = {
source = "${inputs.agents}/context";
recursive = true;
};
"opencode/prompts" = {
source = "${inputs.agents}/prompts";
recursive = true;
};
"opencode/skills" = {
source = "${inputs.agents}/skills";
recursive = true;
};
};
programs.opencode = {
enable = true;
enableMcpIntegration = true;
settings = {
theme = "opencode";
plugin = ["oh-my-opencode" "opencode-beads"];
agent = builtins.fromJSON (builtins.readFile "${inputs.agents}/agents/agents.json");
formatter = {
alejandra = {
command = ["alejandra" "-q" "-"];
extensions = [".nix"];
};
};
provider = {
litellm = {
npm = "@ai-sdk/openai-compatible";
name = "LiteLLM (AZ-Gruppe)";
options.baseURL = "https://llm.az-gruppe.com/v1";
models = {
"gpt-5.2" = {
name = "GPT-5.2";
limit = {
context = 400000;
output = 128000;
};
};
"gpt-5.3-codex" = {
name = "GPT-5.3 Codex";
limit = {
context = 400000;
output = 128000;
};
};
"claude-sonnet-4-6" = {
name = "Claude Sonnet 4.6";
options = {
thinking = {
type = "enabled";
budget_tokens = 16000;
};
};
limit = {
context = 200000;
output = 64000;
};
};
"claude-opus-4-6" = {
name = "Claude Opus 4.6";
options = {
thinking = {
type = "enabled";
budget_tokens = 16000;
};
};
limit = {
context = 200000;
output = 128000;
};
};
};
};
};
};
};
home.file.".config/opencode/oh-my-opencode.json".text = builtins.toJSON {
"$schema" = "https://raw.githubusercontent.com/code-yeongyu/oh-my-opencode/master/assets/oh-my-opencode.schema.json";
google_auth = false;
agents = {
sisyphus = {
model = "litellm/claude-opus-4-6";
};
oracle = {
model = "litellm/claude-sonnet-4-6";
};
librarian = {
model = "litellm/claude-sonnet-4-6";
};
explore = {
model = "zai-coding-plan/glm-4.5-air";
};
multimodal-looker = {
model = "zai-coding-plan/glm-4.6v";
};
prometheus = {
model = "litellm/claude-opus-4-6";
};
metis = {
model = "zai-coding-plan/glm-5";
};
momus = {
model = "zai-coding-plan/glm-5";
};
atlas = {
model = "zai-coding-plan/glm-5";
};
};
categories = {
visual-engineering = {
model = "zai-coding-plan/glm-5";
};
ultrabrain = {
model = "litellm/gpt-5.3-codex";
};
artistry = {
model = "zai-coding-plan/glm-5";
};
quick = {
model = "zai-coding-plan/glm-5";
};
unspecified-low = {
model = "zai-coding-plan/glm-5";
};
unspecified-high = {
model = "zai-coding-plan/glm-5";
};
writing = {
model = "zai-coding-plan/glm-5";
};
};
disabled_mcps = ["context7" "websearch"];
};
}