diff --git a/hosts/m3-hermes/services/hermes-agent.nix b/hosts/m3-hermes/services/hermes-agent.nix index 318f607..ea72c2f 100644 --- a/hosts/m3-hermes/services/hermes-agent.nix +++ b/hosts/m3-hermes/services/hermes-agent.nix @@ -15,9 +15,11 @@ yamlPython = pkgs.python3.withPackages (ps: [ps.pyyaml]); # ── ai-memory client (server: ./ai-memory.nix, same host) ───────────── - # Hooks and the MCP bridge read the bearer from [auth].bearer_token_file - # in the data dir's config.toml, so neither config.yaml nor the process - # environment ever carries the token. + # The MCP bridge reads the bearer from [auth].bearer_token_file in the + # data dir's config.toml; the native `hook` command only looks at + # /auth-token (what `install-hooks --apply` would seed), so that + # file is a symlink to the same secret. Neither config.yaml nor the + # process environment ever carries the token. aiMemory = "${config.services.ai-memory.package}/bin/ai-memory"; aiMemoryUrl = "http://127.0.0.1:${toString (config.m3ta.ports.get "ai-memory")}"; aiMemoryDataDir = "/var/lib/hermes/.local/share/ai-memory"; @@ -42,6 +44,7 @@ in { [auth] bearer_token_file = "${config.age.secrets."ai-memory-hermes-token".path}" ''}" + "L+ ${aiMemoryDataDir}/auth-token - - - - ${config.age.secrets."ai-memory-hermes-token".path}" # Scope marker: Hermes reports its process directory as cwd, so every # assistant session lands in one project of the `home` workspace # (coding checkouts below $HOME with their own marker still win).