102 lines
3.0 KiB
Nix
102 lines
3.0 KiB
Nix
{ den, modules, ... }:
|
|
{
|
|
modules.ai = {
|
|
provides = {
|
|
ollama-cuda = {
|
|
homeManager =
|
|
{ pkgs, ... }:
|
|
{
|
|
home.packages = [ pkgs.ollama-cuda ];
|
|
};
|
|
};
|
|
};
|
|
homeManager =
|
|
{ pkgs, config, ... }:
|
|
{
|
|
home.packages = [
|
|
pkgs.claude-code
|
|
];
|
|
sops = {
|
|
secrets.scug-io-ai-key = {
|
|
# sopsFile = ./secrets.yaml;
|
|
# Decrypted file path (available at runtime, not eval time)
|
|
path = config.home.homeDirectory + "/.secrets/scug_io_api_key";
|
|
sopsFile = ../secrets/content/secrets.yaml;
|
|
};
|
|
};
|
|
programs.fish = {
|
|
shellInit = ''
|
|
if test -f "$HOME/.secrets/scug_io_api_key"
|
|
set -x SCUG_IO_API_KEY (cat "$HOME/.secrets/scug_io_api_key")
|
|
end
|
|
'';
|
|
};
|
|
programs.opencode = {
|
|
enable = true;
|
|
|
|
extraPackages = with pkgs; [
|
|
rust-analyzer
|
|
typescript-language-server
|
|
];
|
|
context = ''
|
|
Instructions:
|
|
|
|
- Do NOT preemptively load all references - use lazy loading based on actual need
|
|
- When loaded, treat content as mandatory instructions that override defaults
|
|
- Follow references recursively when needed
|
|
|
|
- NO EMOJIS
|
|
'';
|
|
settings = {
|
|
"lsp" = true;
|
|
plugin = [
|
|
"@tarquinen/opencode-dcp@latest"
|
|
"@xberg-io/opencode-xberg"
|
|
"@xberg-io/opencode-crawlberg"
|
|
"@xberg-io/opencode-html-to-markdown"
|
|
"@xberg-io/opencode-liter-llm"
|
|
"@xberg-io/opencode-tree-sitter-language-pack"
|
|
];
|
|
provider.litellm = {
|
|
npm = "@ai-sdk/openai-compatible";
|
|
name = "LiteLLM (scuggo)";
|
|
options = {
|
|
baseURL = "https://9f5db439.fwds.scug.io/v1";
|
|
apiKey = "{env:SCUG_IO_API_KEY}";
|
|
};
|
|
models = {
|
|
"openai/Qwen3.6-35B-A3B" = {
|
|
id = "Qwen3.6-35B-A3B";
|
|
name = "Qwen3.6-35B-A3B";
|
|
family = "Qwen";
|
|
limit = {
|
|
context = 262144;
|
|
input = 262144;
|
|
output = 16384;
|
|
};
|
|
cost = {
|
|
input = 0.00002;
|
|
output = 0.00006;
|
|
};
|
|
provider = {
|
|
api = "openai";
|
|
};
|
|
modalities = {
|
|
input = [ "text" ];
|
|
output = [ "text" ];
|
|
};
|
|
status = "active";
|
|
reasoning = true;
|
|
temperature = false;
|
|
tool_call = true;
|
|
attachment = false;
|
|
experimental = false;
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
};
|
|
}
|