dotfiles/home-manager/progs/opencode.nix

40 lines
1022 B
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.
'';
settings = {
theme = "opencode";
model = "z-ai/glm-4.6";
autoshare = false;
autoupdate = true;
provider = {
openrouter = {
models = {
# put models here
};
options = {
# TODO! use agenix here instead
apiKey = "{file:${../secrets/openrouter_api_key}}";
};
};
};
};
};
}