chore: adjust to new opencode config structure

This commit is contained in:
2026-03-30 19:20:35 +02:00
parent 829d1dd8b6
commit fb54000ad8
3 changed files with 61 additions and 94 deletions

View File

@@ -1,42 +1,22 @@
{
inputs,
system,
...
}: let
pkgs = inputs.nixpkgs.legacyPackages.${system};
in {
xdg.configFile."opencode/skills".source = inputs.agents.lib.mkOpencodeSkills {
inherit pkgs;
customSkills = "${inputs.agents}/skills";
# AZ-Gruppe work machine opencode overrides.
# The shared base module lives in m3ta-nixpkgs:
# modules/home-manager/coding/opencode.nix (coding.opencode options)
# Only work-specific provider config and model assignments live here.
{inputs, ...}: {
coding.opencode = {
enable = true;
agentsInput = inputs.agents;
externalSkills = [
# Include all skills from anthropics/skills
{
src = inputs.skills-anthropic;
selectSkills = ["claude-api"];
selectSkills = ["pdf" "docx" "frontend-design"];
}
# Or cherry-pick specific skills:
# { src = inputs.skills-anthropic; selectSkills = [ "mcp-builder" ]; }
{src = inputs.skills-vercel;}
];
};
# Other config — symlinked directly
xdg.configFile."opencode/context".source = "${inputs.agents}/context";
xdg.configFile."opencode/commands".source = "${inputs.agents}/commands";
xdg.configFile."opencode/prompts".source = "${inputs.agents}/prompts";
programs.opencode = {
enable = true;
enableMcpIntegration = true;
settings = {
theme = "opencode";
plugin = ["oh-my-opencode"];
agent = builtins.fromJSON (builtins.readFile "${inputs.agents}/agents/agents.json");
formatter = {
alejandra = {
command = ["alejandra" "-q" "-"];
extensions = [".nix"];
};
};
# AZ-Gruppe LiteLLM endpoint + available models
extraSettings = {
provider = {
litellm = {
npm = "@ai-sdk/openai-compatible";
@@ -100,66 +80,30 @@ in {
};
};
};
};
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";
# Model assignments for oh-my-opencode — all via AZ LiteLLM
ohMyOpencodeSettings = {
agents = {
sisyphus.model = "litellm/claude-opus-4-6";
oracle.model = "litellm/claude-sonnet-4-6";
librarian.model = "litellm/claude-sonnet-4-6";
explore.model = "litellm/claude-haiku-4-5";
multimodal-looker.model = "litellm/gpt-5.3-codex";
prometheus.model = "litellm/claude-opus-4-6";
metis.model = "litellm/claude-opus-4-6";
momus.model = "litellm/claude-opus-4-6";
atlas.model = "litellm/claude-sonnet-4-6";
};
oracle = {
model = "litellm/claude-sonnet-4-6";
};
librarian = {
model = "litellm/claude-sonnet-4-6";
};
explore = {
model = "litellm/claude-haiku-4-5";
};
multimodal-looker = {
model = "litellm/gpt-5.3-codex";
};
prometheus = {
model = "litellm/claude-opus-4-6";
};
metis = {
model = "litellm/claude-opus-4-6";
};
momus = {
model = "litellm/claude-opus-4-6";
};
atlas = {
model = "litellm/claude-sonnet-4-6";
categories = {
visual-engineering.model = "zai-coding-plan/glm-5";
ultrabrain.model = "litellm/claude-opus-4-6";
deep.model = "litellm/claude-sonnet-4-6";
artistry.model = "zai-coding-plan/glm-5.1";
quick.model = "litellm/claude-haiku-4-5";
unspecified-low.model = "litellm/claude-sonnet-4-6";
unspecified-high.model = "litellm/claude-opus-4-6";
writing.model = "zai-coding-plan/glm-5.1";
};
};
categories = {
visual-engineering = {
model = "zai-coding-plan/glm-5";
};
ultrabrain = {
model = "litellm/claude-opus-4-6";
};
deep = {
model = "litellm/claude-sonnet-4-6";
};
artistry = {
model = "zai-coding-plan/glm-5";
};
quick = {
model = "litellm/claude-haiku-4-5";
};
unspecified-low = {
model = "litellm/claude-sonnet-4-6";
};
unspecified-high = {
model = "litellm/claude-opus-4-6";
};
writing = {
model = "zai-coding-plan/glm-5";
};
};
disabled_mcps = ["context7" "websearch"];
};
}