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>
hermenix setup/migrate/remote no longer need a local checkout anywhere:
- Host-specific settings (cache signing key, SSH keys) now live at
/etc/hermenix/local.nix on the host itself, read via an absolute-path
import in common.nix (--impure, deliberately - reading outside the
flake's own source tree). No more guest/common.nix patching, no more
guest/common.nix.bak, no more git-pull conflicts on a locally-edited
tracked file (see the hermes-vm.service incident on hl-fwdesk).
- `setup` builds directly from the flake's own git+ssh URL by default
(--flake to override), so it works from any directory on any host -
dropped the "run this from the hermenix repository root" requirement
entirely.
- `remote` now just runs `nix run <flake>#hermenix -- ...` on the target
host directly - dropped the clone-if-missing/--dir/--repo machinery,
since there's no checkout to manage anymore.
guest/local.nix.example documents the expected shape. Verified the
write-then-read-back round trip (nix-instantiate --eval --json) and the
simplified remote command construction against sandboxed stubs before
pushing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
The bootstrap image (built from common.nix alone - nixos-generators
supplies its own partitioning/bootloader, which is why hardware.nix is
excluded from it) never got hardware.nix's qemu-guest.nix profile or
virtio initrd modules. Both disks are virtio-blk, including the one the
image itself boots from, so the initrd couldn't find its own root
device: "Timed out waiting for device /dev/disk/by-label/nixos",
dropping to emergency mode with root locked - confirmed live on
hl-fwdesk. The label itself was correct (verified via a read-only
losetup + blkid against the built image); the initrd genuinely had no
virtio_blk/virtio_pci module and no qemu-guest.nix profile at all.
Moved the qemu-guest.nix import and virtio_pci/virtio_blk/virtio_scsi
initrd modules from hardware.nix into common.nix, which both the
bootstrap build and the guest's own post-first-boot flake (via
guest/flake.nix importing both files) pull in. hardware.nix keeps only
the partition-specific fileSystems/bootloader config, which genuinely
does need to stay out of the bootstrap build.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
services.hermesVm -> services.hermenix throughout. setup.sh and
migrate-docker-hermes.sh are replaced by nu/hermenix.nu (setup + migrate
subcommands), packaged as a flake output (packages.${system}.hermenix,
pkgs.writers.writeNuBin) so it's installable without cloning conventions
beyond the repo itself. Both subcommands verified end-to-end against a
sandboxed dry run (stubbed disk/cache tools, a local ssh stand-in for the
migrate path) before landing.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Two-disk (system/state) btrfs-backed QEMU VM, nftables-isolated by default,
adapted from a design provided as loose files. Adds a hermesHome option to
the host module and migrate-docker-hermes.sh so an existing flat HERMES_HOME
(e.g. from a prior Docker deployment) can be carried over intact.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>