diff options
Diffstat (limited to 'configs')
| -rw-r--r-- | configs/hermes.nix | 11 |
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 = { |
