default.nix (1126B)
1 { user, ... }: { 2 home-manager.users.${user}.programs.opencode = { 3 enable = true; 4 settings = { 5 autoupdate = false; 6 share = "disabled"; 7 permission."*" = "ask"; 8 model = "ollama/gpt-oss:20b"; 9 enabled_providers = [ "ollama" ]; 10 provider.ollama = { 11 name = "Ollama"; 12 npm = "@ai-sdk/openai-compatible"; 13 options.baseURL = "http://127.0.0.1:11434/v1"; 14 models = { 15 "qwen3-coder:30b".limit = { 16 context = 256 * 1024; 17 input = 128 * 1024; 18 output = 8 * 1024; 19 }; 20 "gpt-oss:20b" = { 21 limit = { 22 context = 128 * 1024; 23 input = 64 * 1024; 24 output = 8 * 1024; 25 }; 26 options.extraBody.think = "high"; 27 }; 28 "qwen3.5:27b".limit = { 29 context = 256 * 1024; 30 input = 128 * 1024; 31 output = 8 * 1024; 32 }; 33 "qwen3.6:27b".limit = { 34 context = 256 * 1024; 35 input = 128 * 1024; 36 output = 8 * 1024; 37 }; 38 }; 39 }; 40 }; 41 }; 42 }