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

25
flake.lock generated
View File

@@ -539,11 +539,11 @@
"openspec": "openspec" "openspec": "openspec"
}, },
"locked": { "locked": {
"lastModified": 1774836080, "lastModified": 1774890264,
"narHash": "sha256-kMV6ZuUOFVE+KTVGjW4XBVEp2nalZNwmk98ZhcQRGrQ=", "narHash": "sha256-ol7BhlYppMb8AN1USa6Sb9nu0BdOhebejq24fdm6qqI=",
"ref": "refs/heads/master", "ref": "refs/heads/master",
"rev": "a63f91d25bc199fcdcddefc46df0532809dc7263", "rev": "e915e5ea193d8bf6b87f37e43b333ed98656602c",
"revCount": 201, "revCount": 203,
"type": "git", "type": "git",
"url": "https://code.m3ta.dev/m3tam3re/nixpkgs" "url": "https://code.m3ta.dev/m3tam3re/nixpkgs"
}, },
@@ -998,6 +998,7 @@
"nixpkgs-unstable": "nixpkgs-unstable", "nixpkgs-unstable": "nixpkgs-unstable",
"nur": "nur", "nur": "nur",
"skills-anthropic": "skills-anthropic", "skills-anthropic": "skills-anthropic",
"skills-vercel": "skills-vercel",
"zugferd-service": "zugferd-service" "zugferd-service": "zugferd-service"
} }
}, },
@@ -1017,6 +1018,22 @@
"type": "github" "type": "github"
} }
}, },
"skills-vercel": {
"flake": false,
"locked": {
"lastModified": 1774562450,
"narHash": "sha256-w4vw0I3q+3AtfcQSRBwOvNKFIz2FEOgqsdcCcZ7UllY=",
"owner": "vercel-labs",
"repo": "skills",
"rev": "d95d0cacfd0ebe9677cb96d51c66a8e9d5630f2c",
"type": "github"
},
"original": {
"owner": "vercel-labs",
"repo": "skills",
"type": "github"
}
},
"systems": { "systems": {
"locked": { "locked": {
"lastModified": 1681028828, "lastModified": 1681028828,

View File

@@ -60,11 +60,17 @@
url = "git+https://code.m3ta.dev/m3tam3re/AGENTS"; url = "git+https://code.m3ta.dev/m3tam3re/AGENTS";
inputs.nixpkgs.follows = "nixpkgs"; inputs.nixpkgs.follows = "nixpkgs";
}; };
skills-anthropic = { skills-anthropic = {
url = "github:anthropics/skills"; url = "github:anthropics/skills";
flake = false; flake = false;
}; };
skills-vercel = {
url = "github:vercel-labs/skills";
flake = false;
};
zugferd-service = { zugferd-service = {
url = "git+https://git.az-gruppe.com/AZ-Intec-GmbH/zugferd-service"; url = "git+https://git.az-gruppe.com/AZ-Intec-GmbH/zugferd-service";
}; };

View File

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