summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--configs/hermes.nix12
1 files changed, 4 insertions, 8 deletions
diff --git a/configs/hermes.nix b/configs/hermes.nix
index 93dbfbf..6000e06 100644
--- a/configs/hermes.nix
+++ b/configs/hermes.nix
@@ -1,7 +1,7 @@
# Hermes Agent (Nous Research), with its own NixOS module, fitted to this
-# guest. hermes runs as hermes in a tmux, which root's console opens. It
-# uses the Claude subscription through the claude CLI: log in once with
-# claude auth login, in a new window there (C-b c).
+# guest. hermes runs as hermes in a tmux, which root opens with
+# hermes-attach. It uses the Claude subscription through the claude CLI:
+# log in once with claude auth login, in a new window there (C-b c).
{ config, lib, pkgs, hostPkgs, ... }:
let
tmux = "${pkgs.tmux}/bin/tmux -S /run/hermes/tmux";
@@ -31,7 +31,7 @@ let
'';
});
- # Root's way (back) into hermes' tmux.
+ # Root's way into hermes' tmux; attaching starts it (see hermes-tmux).
hermes-attach = pkgs.writeShellScriptBin "hermes-attach" ''
exec ${tmux} attach -t hermes
'';
@@ -162,11 +162,7 @@ in
};
inherit (config.systemd.services.hermes-agent) path;
};
- # Detaching gets root's shell back, and hermes-attach goes back in.
environment.systemPackages = [ hermes-attach ];
- programs.bash.loginShellInit = ''
- if [ "$USER" = root ] && [ -z "$TMUX" ]; then ${lib.getExe hermes-attach}; fi
- '';
# The module adds pkgs.git, which needs perl; the package has gitMinimal.
systemd.services.hermes-agent.path = lib.mkForce ([