From 1dd8edcbb0f9c2e282897aebdf44638b734e3f6f Mon Sep 17 00:00:00 2001 From: Erik Simon Date: Sun, 20 Sep 2026 18:10:04 +0200 Subject: [PATCH] fix(mars): restart hermes when the ElevenLabs key rotates podman reads --env-file only at container creation, so re-rendering hermes-agent.env left the running container on its old environment and TTS kept reporting ELEVENLABS_API_KEY not set after the key landed. Co-Authored-By: Claude Opus 5 --- hosts/mars/secrets.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/hosts/mars/secrets.nix b/hosts/mars/secrets.nix index d3f1869..a20cb03 100644 --- a/hosts/mars/secrets.nix +++ b/hosts/mars/secrets.nix @@ -29,8 +29,10 @@ 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 = { }; + # container env — luna calls the API herself. restartUnits because podman + # reads --env-file only at container creation: rotating the key without it + # re-renders the file under a container that never re-reads it. + sops.secrets.elevenlabs_api_key.restartUnits = [ "podman-hermes-agent.service" ]; # 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