opencode: make the rules option also accept a path

This commit is contained in:
Thierry Delafontaine 2025-10-19 11:48:32 +02:00 committed by Austin Horstman
parent c199de6cd8
commit fddb33a1a5
4 changed files with 29 additions and 9 deletions

View file

@ -1,7 +1,8 @@
{
opencode-settings = ./settings.nix;
opencode-empty-settings = ./empty-settings.nix;
opencode-rules = ./rules.nix;
opencode-rules-inline = ./rules-inline.nix;
opencode-rules-path = ./rules-path.nix;
opencode-empty-rules = ./empty-rules.nix;
opencode-agents-inline = ./agents-inline.nix;
opencode-commands-inline = ./commands-inline.nix;

View file

@ -0,0 +1,11 @@
{
programs.opencode = {
enable = true;
rules = ./AGENTS.md;
};
nmt.script = ''
assertFileExists home-files/.config/opencode/AGENTS.md
assertFileContent home-files/.config/opencode/AGENTS.md \
${./AGENTS.md}
'';
}