Bake in build toolchain + auto-run the Hermes installer on first boot
guest/common.nix was missing gcc/make/pkg-config/python3/xz, so the installer's node-pty compile step failed with "No C++ compiler found" - confirmed live during the hl-fwdesk incident. Also added systemd.services.hermes-install: runs the installer unattended (--non-interactive --skip-setup, confirmed supported via upstream's install.sh --help) as part of first boot, gated on its own .hermes-installed marker (same pattern as seedHermesState's .seeded). A real service rather than an activation script since it can take a while (compiling native modules) and shouldn't block boot or a nixos-rebuild. `hermes setup`/`hermes gateway install` stay manual - upstream docs don't show a non-interactive path for those, and they need real credentials anyway. Updated the README and the setup/migrate CLI's printed next-steps to match - two manual commands left instead of four. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
67477953f1
commit
1239ea0148
3 files changed
+39
-7
No files matched your search
@@ -169,13 +169,22 @@ determinate-nixd login
|
||||
|
||||
# Pin the seeded flake
|
||||
sudo nix flake lock /etc/nixos
|
||||
```
|
||||
|
||||
# Install Hermes
|
||||
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
||||
The Hermes CLI installs itself automatically on first boot (`systemd.services.hermes-install`
|
||||
in `common.nix`) — it runs unattended, so there's nothing to run for that
|
||||
part. Give it a few minutes (it's compiling native Node modules); watch it
|
||||
with `journalctl --user -u hermes-install -f` if you want to see it happen.
|
||||
Once it's done:
|
||||
|
||||
```bash
|
||||
hermes setup
|
||||
hermes gateway install
|
||||
```
|
||||
|
||||
These two need real input (model provider, API keys, messaging platform
|
||||
tokens), so they stay manual.
|
||||
|
||||
The identity seed is already in place — `SOUL.md`, a starter `config.yaml`, a
|
||||
`USER.md` and a skill covering safe self-rebuilds. Back on the host, check
|
||||
the gateway came up and that the unit name matches the default:
|
||||
|
||||
+25
-2
@@ -183,12 +183,32 @@ in
|
||||
# Upstream classes Nix/NixOS as a best-effort Tier 2 platform; inside a VM
|
||||
# built to contain mess, taking the supported path is the cheaper trade.
|
||||
#
|
||||
# Run once after first boot:
|
||||
# curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
||||
# The installer itself runs automatically on first boot (below) - it
|
||||
# supports a fully unattended mode and has no need for operator input.
|
||||
# `hermes setup` and `hermes gateway install` do need real input (model
|
||||
# provider, API keys, messaging platform tokens), so those stay manual:
|
||||
# hermes setup
|
||||
# hermes gateway install
|
||||
# loginctl enable-linger hermes
|
||||
# =====================================================================
|
||||
systemd.services.hermes-install = {
|
||||
description = "Install the Hermes Agent CLI (first boot only)";
|
||||
after = [ "network-online.target" ];
|
||||
wants = [ "network-online.target" ];
|
||||
wantedBy = [ "multi-user.target" ];
|
||||
unitConfig.ConditionPathExists = "!${stateDir}/.hermes-installed";
|
||||
serviceConfig = {
|
||||
Type = "oneshot";
|
||||
User = "hermes";
|
||||
Restart = "on-failure";
|
||||
RestartSec = 30;
|
||||
};
|
||||
script = ''
|
||||
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh \
|
||||
| ${pkgs.bash}/bin/bash -s -- --non-interactive --skip-setup
|
||||
touch ${stateDir}/.hermes-installed
|
||||
'';
|
||||
};
|
||||
programs.nix-ld = {
|
||||
enable = true;
|
||||
libraries = with pkgs; [
|
||||
@@ -202,6 +222,9 @@ in
|
||||
git curl jq ripgrep fd tree htop
|
||||
uv nodejs ffmpeg
|
||||
direnv nix-direnv nix-output-monitor
|
||||
# Hermes's installer wants these: a C/C++ toolchain for native Node
|
||||
# modules (node-pty), plus xz for Node tarball extraction.
|
||||
gcc gnumake pkg-config python3 xz
|
||||
];
|
||||
|
||||
programs.direnv = {
|
||||
|
||||
+3
-3
@@ -363,7 +363,7 @@ def "main setup" [
|
||||
lsblk -f (ansi dark_gray)# CHECK LABELS match guest/hardware.nix(ansi reset)
|
||||
determinate-nixd login (ansi dark_gray)# FlakeHub Cache(ansi reset)
|
||||
sudo nix flake lock /etc/nixos
|
||||
curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash
|
||||
(ansi dark_gray)# hermes installs itself automatically - give it a few minutes(ansi reset)
|
||||
hermes setup
|
||||
hermes gateway install
|
||||
|
||||
@@ -453,10 +453,10 @@ def "main migrate" [
|
||||
print ""
|
||||
say "Next, inside the guest (hermes-vm ssh):"
|
||||
say $" export HERMES_HOME=($dest)"
|
||||
say " # then the usual install steps from README.md:"
|
||||
say " # hermes installs itself automatically on first boot - if that's"
|
||||
say " # already done (check: hermes-ctl units), just:"
|
||||
say " # determinate-nixd login"
|
||||
say " # sudo nix flake lock /etc/nixos"
|
||||
say " # curl -fsSL https://raw.githubusercontent.com/NousResearch/hermes-agent/main/scripts/install.sh | bash"
|
||||
say " # hermes setup"
|
||||
say " # hermes gateway install"
|
||||
print ""
|
||||
|
||||
Reference in new issue
Block a user