From 67482f39ff46ec5e7b32ec1c98441f3088af9e7d Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 10:27:51 +0000 Subject: configs/hermes: let model changes last Managed (HERMES_MANAGED, or the module's .managed marker), Hermes refuses to save config.yaml at all, so /model --global and hermes model couldn't keep a change; only session-only /model worked. Set HERMES_MANAGED=false, which wins over the marker, for the gateway, the tmux and hermes' shells, and make config.yaml writable for hermes. The settings here still replace their keys in config.yaml at every boot. --- configs/hermes.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'configs/hermes.nix') diff --git a/configs/hermes.nix b/configs/hermes.nix index c80a7b2..7255fc3 100644 --- a/configs/hermes.nix +++ b/configs/hermes.nix @@ -175,9 +175,22 @@ in rm -rf "$p" cp -r --no-preserve=mode ${claude-subscription-directsdk} "$p" chown -R hermes:hermes "$p" + + # Writable for hermes, too, see HERMES_MANAGED below. + chmod 0660 ${config.services.hermes-agent.stateDir}/.hermes/config.yaml ''; }; + # Not managed, as far as Hermes is concerned: managed, it refuses to + # save config.yaml at all, which takes interactive model changes that + # last (/model --global, hermes model). HERMES_MANAGED wins over the + # module's .managed marker. At boot, the settings here still replace + # the same keys in config.yaml (model.provider, model.default, ...), + # which keeps the rest. + environment.variables.HERMES_MANAGED = "false"; + systemd.services.hermes-agent.environment.HERMES_MANAGED = lib.mkForce "false"; + systemd.services.hermes-tmux.environment.HERMES_MANAGED = "false"; + # users.manageLingering is off here. Without a user manager, hermes' # cron can't run jobs; nothing else needs one. users.users.hermes.linger = null; -- cgit v1.3.1