feat(home): opencode module — link config/opencode → ~/.config/opencode
Adds metacfg.cli-apps.opencode (default enabled) which mounts the in-repo opencode config (provider list, web-search skill) via xdg.configFile, so all hosts pick it up automatically.
This commit is contained in:
parent
c4e6599803
commit
a63abebda3
3 changed files with 148 additions and 0 deletions
23
modules/home/cli-apps/opencode/default.nix
Normal file
23
modules/home/cli-apps/opencode/default.nix
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
{
|
||||
lib,
|
||||
config,
|
||||
...
|
||||
}:
|
||||
let
|
||||
inherit (lib) mkIf;
|
||||
inherit (lib.metacfg) mkBoolOpt;
|
||||
|
||||
cfg = config.metacfg.cli-apps.opencode;
|
||||
in
|
||||
{
|
||||
options.metacfg.cli-apps.opencode = {
|
||||
enable = mkBoolOpt true "Enable opencode config.";
|
||||
};
|
||||
|
||||
config = mkIf cfg.enable {
|
||||
xdg.configFile."opencode" = {
|
||||
source = ../../../../config/opencode;
|
||||
recursive = true;
|
||||
};
|
||||
};
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue