feat(mars): provision luna's ElevenLabs API key via sops
ELEVENLABS_API_KEY is the only env override ElevenLabs takes; provider, voice_id and model_id are config.yaml-only. Seeds tts.provider through the existing prepare-dirs yq merge so it defaults to elevenlabs without pinning it — KittenTTS stays provisioned as the offline fallback. Needs elevenlabs_api_key in secrets/mars.yaml before the next deploy, or sops-nix fails activation on the missing key. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
@@ -256,7 +256,11 @@ in
|
||||
# only this key is merged in; without it the Secure cookie flag breaks.
|
||||
conf=${hermesHome}/config.yaml
|
||||
[ -e "$conf" ] || : > "$conf"
|
||||
yq '.dashboard.trusted_proxies = ["${neptunTailnetIp}"]' "$conf" > "$conf.new"
|
||||
# tts.provider is seeded, not pinned: `=` would stomp luna's own choice on
|
||||
# every restart, and the engine is hers to change (KittenTTS stays as the
|
||||
# offline fallback). `//` only fills it in when unset.
|
||||
yq '.dashboard.trusted_proxies = ["${neptunTailnetIp}"]
|
||||
| .tts.provider = (.tts.provider // "elevenlabs")' "$conf" > "$conf.new"
|
||||
chown ${hermesUid}:${hermesGid} "$conf.new"
|
||||
chmod --reference="$conf" "$conf.new"
|
||||
mv -f "$conf.new" "$conf"
|
||||
|
||||
@@ -28,6 +28,9 @@
|
||||
sops.secrets.opencode_go_api_key = { };
|
||||
sops.secrets.telegram_bot_token = { };
|
||||
sops.secrets.hermes_dashboard_oidc_client_secret = { };
|
||||
# ElevenLabs TTS/STT. Unlike the webhook secret this must live in the
|
||||
# container env — luna calls the API herself.
|
||||
sops.secrets.elevenlabs_api_key = { };
|
||||
# Same value as secrets/jupiter.yaml (the sending side), stored WITHOUT a
|
||||
# trailing newline — a stray newline would change the HMAC key and fail
|
||||
# every delivery. Written host-side by hermes-agent-webhook-routes, so it
|
||||
@@ -43,6 +46,7 @@
|
||||
WEBHOOK_ENABLED=true
|
||||
WEBHOOK_PORT=8644
|
||||
HERMES_DASHBOARD_OIDC_CLIENT_SECRET=${config.sops.placeholder.hermes_dashboard_oidc_client_secret}
|
||||
ELEVENLABS_API_KEY=${config.sops.placeholder.elevenlabs_api_key}
|
||||
'';
|
||||
|
||||
# luna's gitea push token (services/dev/gitea.nix provisions the account +
|
||||
|
||||
Reference in New Issue
Block a user