From 0c5656e6277aefcb3704ab1715e81a6ab7462bc4 Mon Sep 17 00:00:00 2001 From: tv Date: Sat, 21 Nov 2026 15:14:33 +0000 Subject: configs/hermes: hermes.env a secret, not from /xchg hermes.env (the API key, and the Webapp's sign-in) came from /xchg, which every VM started in the same directory sees. Now it's a secret (fc.secrets."hermes.env", /run/secrets/hermes.env), which the run script requires: --secret hermes.env=FILE. (The module still copies it into ~/.hermes/.env, onto the home drive.) --- configs/hermes.nix | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) (limited to 'configs/hermes.nix') diff --git a/configs/hermes.nix b/configs/hermes.nix index 0cc0736..bbc5446 100644 --- a/configs/hermes.nix +++ b/configs/hermes.nix @@ -2,7 +2,7 @@ # guest. hermes runs as hermes in a tmux, which root opens with # hermes-attach. Two ways to Claude, selectable with /model or hermes # model: the Claude API (provider anthropic, the default), with the API key -# from the host's xchg (see environmentFiles), and the Claude subscription +# from the secret hermes.env (see environmentFiles), and the Claude subscription # through the claude CLI (provider claude-subscription-directsdk-experimental): # log in once with claude auth login, in a new window there (C-b c). The # state is in /home/hermes, i.e. on the run script's --home drive, which is @@ -156,13 +156,16 @@ in # the host at http://GUEST:9120. Off loopback, it needs a sign-in: # put HERMES_DASHBOARD_BASIC_AUTH_USERNAME, ..._PASSWORD (or # ..._PASSWORD_HASH) and ..._SECRET (32+ random bytes) into hermes.env - # in the host's xchg, which is read at boot. + # (the secret, see environmentFiles). settings.webapp = { enabled = true; host = "0.0.0.0"; port = 9120; }; - environmentFiles = [ "/xchg/hermes.env" ]; + # A secret (fc.secrets), from the run script: --secret + # hermes.env=FILE, which it requires. The module copies it into + # ~/.hermes/.env, i.e. onto the home drive. + environmentFiles = [ config.fc.secrets."hermes.env".path ]; # The login is in ~/.claude, i.e. in stateDir. extraPackages = [ pkgs.claude-code ]; }; @@ -173,6 +176,8 @@ in ]; fc.home.required = true; + # The API key and the Webapp's sign-in, see environmentFiles. + fc.secrets."hermes.env" = { }; # A normal user, with a home like any other. /home is mounted after # users get created, see tmpfiles below. users.users.hermes = { -- cgit v1.3.1