Rename project to hermenix; convert host scripts to a Nu CLI

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>
This commit is contained in:
ariandClaude Sonnet 5 committed 2026-09-15 13:26:18 -04:00
1 parent 12227460fd
commit 2b33b98bae
10 files changed
+570 -568

No files matched your search

+9 -9
View File
@@ -2,7 +2,7 @@
let
inherit (lib) mkOption mkEnableOption mkIf types optionalString;
cfg = config.services.hermesVm;
cfg = config.services.hermenix;
net = cfg.network;
vmUser = "hermes-vm";
@@ -41,7 +41,7 @@ let
'';
in
{
options.services.hermesVm = {
options.services.hermenix = {
enable = mkEnableOption "the Hermes Agent VM";
name = mkOption {
@@ -67,7 +67,7 @@ in
description = ''
Directory holding the guest's disk images. On btrfs this should be
laid out as three subvolumes - system/, state/ and snapshots/ - with
nodatacow set. setup.sh does this for you.
nodatacow set. `hermenix setup` does this for you.
'';
};
@@ -370,7 +370,7 @@ in
layout under the state disk mount. Override this when carrying over
an existing flat HERMES_HOME from elsewhere (e.g. a prior Docker
deployment) that you're placing directly at the root of the state
disk instead of under .hermes - see migrate-docker-hermes.sh.
disk instead of under .hermes - see `hermenix migrate --help`.
This only changes where the host-side hermes-ctl wrapper (soul,
memory, conf, secrets, reseed, pull) looks. It does not change what
@@ -390,16 +390,16 @@ in
assertions = [
{
assertion = net.externalInterface != null;
message = "services.hermesVm.network.externalInterface must be set.";
message = "services.hermenix.network.externalInterface must be set.";
}
{
assertion = cfg.backup.enable -> (cfg.backup.repository != "");
message = "services.hermesVm.backup.repository must be set when backups are enabled.";
message = "services.hermenix.backup.repository must be set when backups are enabled.";
}
{
assertion = anyPci -> (pt.iommu != null);
message = ''
services.hermesVm.passthrough.pci needs passthrough.iommu set to
services.hermenix.passthrough.pci needs passthrough.iommu set to
"intel" or "amd". Without the IOMMU, a passed-through device can
read host memory directly and the VM boundary is meaningless.
'';
@@ -429,7 +429,7 @@ in
preStart = ''
for img in ${systemImage} ${stateImage}; do
if [ ! -e "$img" ]; then
echo "$img is missing. Run ./setup.sh first." >&2
echo "$img is missing. Run 'hermenix setup' first." >&2
exit 1
fi
done
@@ -716,7 +716,7 @@ in
# Snapshots of the state disk only.
#
# The system disk is not snapshotted on purpose. It is large, it is where
# all the write churn happens, and setup.sh can rebuild it from the flake
# all the write churn happens, and `hermenix setup` can rebuild it from the flake
# in minutes. Snapshotting it would cost a lot and buy nothing.
# =====================================================================
systemd.services.hermes-vm-snapshot = mkIf cfg.snapshots.enable {