37 lines
951 B
Nix
37 lines
951 B
Nix
{ config, lib, ... }: {
|
|
|
|
options.homeconfig.opencode.enable = with lib; mkOption {
|
|
type = with types; bool;
|
|
default = true;
|
|
};
|
|
|
|
config = lib.mkIf config.homeconfig.opencode.enable {
|
|
|
|
programs.opencode = {
|
|
enable = true;
|
|
|
|
settings = {
|
|
theme = "system";
|
|
model = "ollama-local/llama3.2";
|
|
|
|
provider = {
|
|
ollama-local = {
|
|
name = "Ollama (local)";
|
|
|
|
npm = "@ai-sdk/openai-compatible";
|
|
|
|
options.baseURL = "http://localhost:11434/v1";
|
|
|
|
models = {
|
|
"ministral-3:8b".name = "Ministral 3 8B";
|
|
"llama3.2".name = "Llama 3.2";
|
|
"qwen3:8b".name = "Qwen 3";
|
|
};
|
|
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|