mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-11 09:29:41 +08:00
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.
28 lines
787 B
Nix
28 lines
787 B
Nix
{
|
|
programs.opencode = {
|
|
enable = true;
|
|
commands = {
|
|
changelog = ''
|
|
# Update Changelog Command
|
|
|
|
Update CHANGELOG.md with a new entry for the specified version.
|
|
Usage: /changelog [version] [change-type] [message]
|
|
'';
|
|
commit = ''
|
|
# Commit Command
|
|
|
|
Create a git commit with proper message formatting.
|
|
Usage: /commit [message]
|
|
'';
|
|
};
|
|
};
|
|
nmt.script = ''
|
|
assertFileExists home-files/.config/opencode/command/changelog.md
|
|
assertFileExists home-files/.config/opencode/command/commit.md
|
|
assertFileContent home-files/.config/opencode/command/changelog.md \
|
|
${./changelog-command.md}
|
|
assertFileContent home-files/.config/opencode/command/commit.md \
|
|
${./commit-command.md}
|
|
'';
|
|
}
|