summaryrefslogtreecommitdiffstats
path: root/configs/hermes.nix
diff options
context:
space:
mode:
Diffstat (limited to 'configs/hermes.nix')
-rw-r--r--configs/hermes.nix16
1 files changed, 13 insertions, 3 deletions
diff --git a/configs/hermes.nix b/configs/hermes.nix
index 6000e06..b0f5570 100644
--- a/configs/hermes.nix
+++ b/configs/hermes.nix
@@ -1,6 +1,9 @@
# Hermes Agent (Nous Research), with its own NixOS module, fitted to this
# guest. hermes runs as hermes in a tmux, which root opens with
-# hermes-attach. It uses the Claude subscription through the claude CLI:
+# 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
+# through the claude CLI (provider claude-subscription-directsdk-experimental):
# log in once with claude auth login, in a new window there (C-b c).
{ config, lib, pkgs, hostPkgs, ... }:
let
@@ -115,10 +118,17 @@ in
# /var is a tmpfs. This is on the only drive that can outlive a boot,
# like nix's database, see /nix/var.
stateDir = "/nix/.rw-store/hermes";
+ # The anthropic provider uses ANTHROPIC_API_KEY from hermes.env, see below.
+ # Don't put ANTHROPIC_TOKEN or CLAUDE_CODE_OAUTH_TOKEN otherwise hermes
+ # disguises itself as claude code.
settings.model = {
- provider = "claude-subscription-directsdk-experimental";
- default = "opus";
+ provider = "anthropic";
+ default = "claude-opus-5-5";
};
+ # Prevent anthropic provider from using ~/.claude/.credentials.json
+ # claude-subscription-directsdk-experimental is unaffected as it's going
+ # via the claude CLI.
+ settings.auth.adopt_external_logins = false;
# The Webapp (Hermes Desktop in a browser), served by the gateway, for
# the host at http://GUEST:9120. Off loopback, it needs a sign-in:
# put HERMES_DASHBOARD_BASIC_AUTH_USERNAME, ..._PASSWORD (or