fix(ai-tools): nixify home-managed 'opencode'
check / lint (push) Successful in 15s

This commit is contained in:
2026-10-07 21:49:30 +02:00
parent a081a31077
commit b5d6e66bb1
+15 -1
View File
@@ -1,14 +1,28 @@
{
lib,
config,
lib,
pkgs,
...
}:
let
cfg = config.ai-tools.opencode;
in
{
config = lib.mkIf cfg.enable {
secrets.files.opencode = [ "api-key" ];
secrets.templates."opencode/auth.json" = {
path = ".local/share/opencode/auth.json";
content = ''
{
"zai-coding-plan": {
"type": "api",
"key": "${config.sops.placeholder."opencode/api-key"}"
}
}
'';
};
home.packages = [ pkgs.opencode ];
home.file.".config/opencode/opencode.json".text = builtins.toJSON {