opencode
This commit is contained in:
30
home-modules/opencode.nix
Normal file
30
home-modules/opencode.nix
Normal file
@@ -0,0 +1,30 @@
|
||||
{ pkgs, ... }@all: with all; {
|
||||
home = {
|
||||
packages = with pkgs; [
|
||||
unstable.opencode
|
||||
];
|
||||
file.".config/opencode/opencode.json".text = let
|
||||
model = "qwen2.5-coder:7b";
|
||||
in builtins.toJSON {
|
||||
"$schema" = "https://opencode.ai/config.json";
|
||||
model = "ollama/${model}";
|
||||
theme = "matrix";
|
||||
provider = {
|
||||
ollama = {
|
||||
apiKey = "KEY";
|
||||
disabled = false;
|
||||
npm = "@ai-sdk/openai-compatible";
|
||||
options = {
|
||||
baseURL = "http://localhost:11434/v1";
|
||||
};
|
||||
models = {
|
||||
"${model}" = {
|
||||
tools = true;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user