25 lines
485 B
Nix
25 lines
485 B
Nix
{ config, ... }:
|
|
|
|
let
|
|
inherit (config.host) username;
|
|
inherit (config.secrets) owner;
|
|
in
|
|
{
|
|
config = {
|
|
secrets.groups.opencode = [ "api-key" ];
|
|
|
|
sops.templates."opencode/auth.json" = {
|
|
inherit owner;
|
|
path = "/home/${username}/.local/share/opencode/auth.json";
|
|
content = ''
|
|
{
|
|
"zai-coding-plan": {
|
|
"type": "api",
|
|
"key": "${config.sops.placeholder."opencode/api-key"}"
|
|
}
|
|
}
|
|
'';
|
|
};
|
|
};
|
|
}
|