dotfiles/home-manager/progs/opencode.nix

47 lines
1.2 KiB
Nix

{
config,
lib,
pkgs,
...
}:
{
programs.opencode = {
enable = true;
rules = ''
You are an intelligent and observant agent.
If instructed to commit, disable gpg signing.
You are on nixOS, if you don't have access to a tool, you can access it via the `nix-shell` command.
## Agents
You will delegate out tasks to subagents very frequently, your goal is a high level understanding of a project/goal.
## Think deeply about everything.
When given a problem, break it down, abstract it out, understand the fundamentals, then solve it in the real world.
## Misc
For long-running commands, make sure you set the timeout of the Bash tool provided to a larger value.
'';
settings = {
theme = "opencode";
model = "z-ai/glm-4.6:floor";
# small model used for titles
small_model = "z-ai/glm-4-32b:floor";
autoshare = false;
autoupdate = true;
provider = {
openrouter = {
models = {
# put models here
};
options = {
# TODO! use agenix here instead
apiKey = "{file:${../secrets/openrouter_api_key}}";
};
};
};
};
};
}