Files
nix/modules/software/llm/opencode.nix
T
2026-08-22 21:46:30 -05:00

26 lines
661 B
Nix

{ pkgs, lib, ... }:
let
opencode-json = pkgs.writeText "opencode.json" (builtins.toJSON {
"$schema" = "https://opencode.ai/config.json";
plugin = [ "opencode-plugin-llama.cpp@latest" ];
provider = {
llama.cpp = {
npm = "@ai-sdk/openai-compatible";
name = "llama.cpp";
options.baseURL = "https://llama.bug.tools/v1";
models.qwen3.6-35b-a3b.name = "qwen3.6-35b-a3b";
};
};
});
in {
den.aspects.opencode = {
nixos = { ... }: {
# opencode config: ${opencode-json}
};
home-manager = { ... }: {
home.file.".config/opencode/opencode.json".source = opencode-json;
};
};
}