feat(opencode): add workstation API key secret

This commit is contained in:
2026-03-23 08:59:42 +00:00
parent c859f5e41e
commit 4adc8329a1
5 changed files with 61 additions and 1 deletions

View File

@@ -1,9 +1,12 @@
{inputs, ...}: {
den.aspects.ai-tools.homeManager = {
lib,
pkgs,
inputs',
...
}: {
}: let
opencodeSecretPath = "/run/secrets/opencode-api-key";
in {
home.packages = [
inputs'.llm-agents.packages.claude-code
inputs'.llm-agents.packages.pi
@@ -11,6 +14,13 @@
pkgs.cog-cli
];
programs.nushell.extraEnv =
lib.mkAfter ''
if ("${opencodeSecretPath}" | path exists) {
$env.OPENCODE_API_KEY = (open --raw "${opencodeSecretPath}" | str trim)
}
'';
home.file = {
"AGENTS.md".source = ./_ai-tools/AGENTS.md;
".pi/agent/extensions/pi-elixir" = {