summaryrefslogtreecommitdiffstats
path: root/configs
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-21 15:14:33 +0000
committertv <tv@krebsco.de>2026-11-21 15:14:33 +0000
commit0c5656e6277aefcb3704ab1715e81a6ab7462bc4 (patch)
tree5dd9777569b95d745b9fa28a95a335b3d8d6df8e /configs
parent8998ef08f918b726762cbe6f7f4101d64ba8aefa (diff)
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.)
Diffstat (limited to 'configs')
-rw-r--r--configs/hermes.nix11
1 files changed, 8 insertions, 3 deletions
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 = {