opencode: support directory-based configuration for commands, agents, and themes

The `commands`, `agents`, and `themes` options now accept either an
attribute set (existing behavior) or a path to a directory containing
multiple files. When a directory path is provided, it is symlinked to
the appropriate `$XDG_CONFIG_HOME/opencode/` subdirectory.

This change aligns with the existing `skills` option implementation and
provides a more convenient way to manage multiple configuration files
without needing to define each one individually in Nix.
This commit is contained in:
Thierry Delafontaine 2026-01-04 12:59:22 +01:00 committed by Austin Horstman
parent 2be878259a
commit 081234b704
18 changed files with 246 additions and 56 deletions

View file

@ -6,12 +6,14 @@
# Update Changelog Command
Update CHANGELOG.md with a new entry for the specified version.
Usage: /changelog [version] [change-type] [message]'';
Usage: /changelog [version] [change-type] [message]
'';
commit = ''
# Commit Command
Create a git commit with proper message formatting.
Usage: /commit [message]'';
Usage: /commit [message]
'';
};
};
nmt.script = ''