From e13ab7360cb42a543480cc45afae3b155b81b03e Mon Sep 17 00:00:00 2001 From: tv Date: Fri, 20 Nov 2026 01:43:51 +0000 Subject: configs/hermes: use hermes on the console as hermes, not root The console logs in as hermes instead of root, and the hermes CLI goes into that user's packages instead of the system's. The user's home is the service's stateDir, so the CLI finds the service's state at ~/.hermes without HERMES_HOME set system-wide. --- configs/hermes.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/configs/hermes.nix b/configs/hermes.nix index cac976d..b963349 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. Put ANTHROPIC_API_KEY=... into hermes.env in /xchg on the host; # run hermes on the console. -{ config, ... }: +{ config, lib, ... }: let # Not a flake input: flake-compat evaluates hermes-agent's flake, with its # flake.lock, using plain nix. Bump rev and sha256 together. @@ -30,10 +30,13 @@ in }; # Read at boot; a missing file only gets a warning. environmentFiles = [ "/xchg/hermes.env" ]; - # hermes on the console shares the service's state. - addToSystemPackages = true; }; + # The console is hermes', not root's. Its home is stateDir, so hermes + # there uses the service's state at ~/.hermes. + services.getty.autologinUser = lib.mkForce "hermes"; + users.users.hermes.packages = [ config.services.hermes-agent.package ]; + # nixos-init doesn't run activation scripts, and that's where the module # creates the state and installs config.yaml and .env. systemd.services.hermes-agent-setup = { -- cgit v1.3.1