summaryrefslogtreecommitdiffstats
path: root/configs/hermes.nix
diff options
context:
space:
mode:
authortv <tv@krebsco.de>2026-11-20 10:27:51 +0000
committertv <tv@krebsco.de>2026-11-20 11:29:53 +0100
commit67482f39ff46ec5e7b32ec1c98441f3088af9e7d (patch)
treeecf7313088cae32619f039d8e1b0b3f8578157a8 /configs/hermes.nix
parentdafc1ef0fd5162d823d065fcc728797a09677330 (diff)
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.
Diffstat (limited to 'configs/hermes.nix')
-rw-r--r--configs/hermes.nix13
1 files changed, 13 insertions, 0 deletions
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;