Files
home-manager/tests/modules/programs/opencode/themes-bulk-directory.nix
Thierry Delafontaine 081234b704 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.
2026-01-08 16:32:29 -05:00

16 lines
480 B
Nix

{
programs.opencode = {
enable = true;
themes = ./themes-bulk;
};
nmt.script = ''
assertFileExists home-files/.config/opencode/themes/dark-theme.json
assertFileExists home-files/.config/opencode/themes/light-theme.json
assertFileContent home-files/.config/opencode/themes/dark-theme.json \
${./themes-bulk/dark-theme.json}
assertFileContent home-files/.config/opencode/themes/light-theme.json \
${./themes-bulk/light-theme.json}
'';
}