55 lines
1.3 KiB
Nix
55 lines
1.3 KiB
Nix
{config, ...}: {
|
|
home.dev.ai = {
|
|
enable = true;
|
|
opencode = {
|
|
tui = {
|
|
mouse = true;
|
|
theme = "nord";
|
|
attention = {
|
|
enabled = true;
|
|
notifications = true;
|
|
};
|
|
keybinds = {
|
|
leader = "ctrl+x";
|
|
"command_list" = "<leader><leader>";
|
|
};
|
|
};
|
|
settings = {
|
|
autoupdate = false;
|
|
provider = {
|
|
ollama = {
|
|
npm = "@ai-sdk/openai-compatible";
|
|
name = "Ollama (marpa)";
|
|
options.baseURL = "http://marpa:11434/v1";
|
|
};
|
|
models = {
|
|
"qwen3.5:9b".name = "Qwen 3.5 Medium";
|
|
"gemma4:e4b".name = "Gemma E4B";
|
|
"qwen2.5-coder:1.5b-base".name = "Qwen 2.5 Coder Light";
|
|
};
|
|
};
|
|
permission = {
|
|
"*" = "ask";
|
|
glob = "allow";
|
|
grep = "allow";
|
|
read = {
|
|
"*" = "allow";
|
|
"*.env" = "deny";
|
|
"*.env.*" = "deny";
|
|
"*.env.example" = "allow";
|
|
};
|
|
};
|
|
formatter.nixfmt = {
|
|
command = ["nix" "fmt" "$FILE"];
|
|
extensions = [".nix"];
|
|
};
|
|
};
|
|
web = {
|
|
enable = true;
|
|
cors = config.sops.secrets."opencode/cors".path;
|
|
mdns.enable = true;
|
|
};
|
|
};
|
|
};
|
|
}
|