diff options
| author | tv <tv@krebsco.de> | 2026-11-20 17:13:49 +0000 |
|---|---|---|
| committer | tv <tv@krebsco.de> | 2026-11-20 18:16:44 +0100 |
| commit | f284a60c9d6efedf659bcc940dc0daf119b54944 (patch) | |
| tree | 463cbcf0e519a08d9aba6e801091b3a1fe760b96 /configs | |
| parent | a6068061f81df251fbf94ac417bf8b83fdcead41 (diff) | |
configs/hermes: don't attach root's login shell to hermes' tmux
Root's login shell ran hermes-attach, which starts hermes' tmux, and
root logs in automatically on the console. Root attaches with
hermes-attach when it wants to.
Diffstat (limited to 'configs')
| -rw-r--r-- | configs/hermes.nix | 12 |
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 ([ |
