Merge branch 'main' of ssh://git.cyperpunk.de:12222/DerGrumpf/cyper-nix
This commit is contained in:
@@ -18,6 +18,7 @@
|
|||||||
./neovim
|
./neovim
|
||||||
./python.nix
|
./python.nix
|
||||||
./fonts.nix
|
./fonts.nix
|
||||||
|
./opencode.nix
|
||||||
inputs.sops-nix.homeManagerModules.sops
|
inputs.sops-nix.homeManagerModules.sops
|
||||||
]
|
]
|
||||||
++ lib.optionals (!isDarwin && !isServer) [
|
++ lib.optionals (!isDarwin && !isServer) [
|
||||||
|
|||||||
+30
-22
@@ -5,25 +5,41 @@
|
|||||||
plugins = {
|
plugins = {
|
||||||
markdown-preview.enable = true;
|
markdown-preview.enable = true;
|
||||||
render-markdown.enable = true;
|
render-markdown.enable = true;
|
||||||
|
|
||||||
avante = {
|
avante = {
|
||||||
enable = true;
|
enable = true;
|
||||||
autoLoad = true;
|
autoLoad = true;
|
||||||
settings = {
|
settings = {
|
||||||
provider = "groq";
|
provider = "ollama";
|
||||||
|
|
||||||
providers.groq = {
|
providers = {
|
||||||
__inherited_from = "openai";
|
groq = {
|
||||||
api_key_name = "cmd:cat /home/phil/.config/sops-nix/secrets/GROQ_API_KEY";
|
__inherited_from = "openai";
|
||||||
endpoint = "https://api.groq.com/openai/v1/";
|
api_key_name = "cmd:cat /home/phil/.config/sops-nix/secrets/GROQ_API_KEY";
|
||||||
model = "qwen/qwen3-32b"; # "llama-3.3-70b-versatile";
|
endpoint = "https://api.groq.com/openai/v1/";
|
||||||
system_promt = "You are a helpful coding assistant. Always respond in plain markdown format without using tool calls or JSON structures.";
|
model = "qwen/qwen3-32b";
|
||||||
disable_tools = true;
|
system_promt = "You are a helpful coding assistant. Always respond in plain markdown format without using tool calls or JSON structures.";
|
||||||
extra_request_body = {
|
disable_tools = true;
|
||||||
temperature = 1;
|
extra_request_body = {
|
||||||
max_tokens = 2000;
|
temperature = 1;
|
||||||
response_format = {
|
max_tokens = 2000;
|
||||||
type = "text";
|
response_format = {
|
||||||
|
type = "text";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
ollama = {
|
||||||
|
endpoint = "http://100.109.179.25:11434"; # tailscale IP, no /v1 suffix
|
||||||
|
model = "qwen2.5:3b"; # swap for "llama3.2:3b" or "deepseek-r1:1.5b"
|
||||||
|
timeout = 60000; # local + small model can be slow on first load
|
||||||
|
disable_tools = true; # these small models aren't reliable at tool calling
|
||||||
|
is_env_set.__raw = ''require("avante.providers.ollama").check_endpoint_alive'';
|
||||||
|
extra_request_body = {
|
||||||
|
options = {
|
||||||
|
temperature = 0.7;
|
||||||
|
num_ctx = 8192;
|
||||||
|
keep_alive = "5m";
|
||||||
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
@@ -35,7 +51,6 @@
|
|||||||
code = true;
|
code = true;
|
||||||
link = true;
|
link = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
behaviour = {
|
behaviour = {
|
||||||
enable_cursor_planning_mode = false;
|
enable_cursor_planning_mode = false;
|
||||||
auto_suggestions = false;
|
auto_suggestions = false;
|
||||||
@@ -46,7 +61,6 @@
|
|||||||
use_selection_as_context = true;
|
use_selection_as_context = true;
|
||||||
max_context_tokens = 2000;
|
max_context_tokens = 2000;
|
||||||
};
|
};
|
||||||
|
|
||||||
mappings = {
|
mappings = {
|
||||||
ask = "<leader>aa";
|
ask = "<leader>aa";
|
||||||
edit = "<leader>ae";
|
edit = "<leader>ae";
|
||||||
@@ -79,11 +93,9 @@
|
|||||||
reverse_switch_windows = "<S-Tab>";
|
reverse_switch_windows = "<S-Tab>";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
hints = {
|
hints = {
|
||||||
enabled = true;
|
enabled = true;
|
||||||
};
|
};
|
||||||
|
|
||||||
windows = {
|
windows = {
|
||||||
position = "right";
|
position = "right";
|
||||||
wrap = true;
|
wrap = true;
|
||||||
@@ -93,22 +105,18 @@
|
|||||||
rounded = true;
|
rounded = true;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
highlights = {
|
highlights = {
|
||||||
diff = {
|
diff = {
|
||||||
current = "DiffText";
|
current = "DiffText";
|
||||||
incoming = "DiffAdd";
|
incoming = "DiffAdd";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
diff = {
|
diff = {
|
||||||
autojump = true;
|
autojump = true;
|
||||||
list_opener = "copen";
|
list_opener = "copen";
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
#extraPackages = with pkgs; [ curl ];
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,32 @@
|
|||||||
|
_: {
|
||||||
|
programs.opencode = {
|
||||||
|
enable = true;
|
||||||
|
|
||||||
|
settings = {
|
||||||
|
enabled_providers = [ "ollama" ];
|
||||||
|
|
||||||
|
model = "ollama/llama3.2:3b";
|
||||||
|
|
||||||
|
provider = {
|
||||||
|
ollama = {
|
||||||
|
npm = "@ai-sdk/openai-compatible";
|
||||||
|
name = "Ollama (tailscale)";
|
||||||
|
options = {
|
||||||
|
baseURL = "http://100.109.179.25:11434/v1";
|
||||||
|
};
|
||||||
|
models = {
|
||||||
|
"llama3.2:3b" = {
|
||||||
|
name = "Llama 3.2 3B";
|
||||||
|
};
|
||||||
|
"qwen2.5:3b" = {
|
||||||
|
name = "Qwen 2.5 3B";
|
||||||
|
};
|
||||||
|
"deepseek-r1:1.5b" = {
|
||||||
|
name = "DeepSeek-R1 1.5B";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user