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>
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>