new single file with fixes

This commit is contained in:
ari committed 2026-09-17 12:15:53 -04:00
1 parent f5f6a98152
commit 21e87b6bfa
10 files changed
+710 -778

No files matched your search

+20 -52
View File
@@ -341,22 +341,12 @@ in
};
};
cliName = mkOption {
type = types.str;
default = "hermes-ctl";
description = ''
Name of the host-side wrapper that drives Hermes inside the guest.
Set to "hermes" if you want it to feel local and are sure nothing
else on the host claims that name.
'';
};
gatewayUnit = mkOption {
type = types.str;
default = "hermes-agent";
description = ''
The systemd *user* unit that `hermes gateway install` created in the
guest. Check with `hermes-ctl units` after installing; upstream has
guest. Check with `hermenix ctl units` after installing; upstream has
used more than one name for this.
'';
};
@@ -372,7 +362,7 @@ in
deployment) that you're placing directly at the root of the state
disk instead of under .hermes - see `hermenix migrate --help`.
This only changes where the host-side hermes-ctl wrapper (soul,
This only changes where the host-side `hermenix ctl` commands (soul,
memory, conf, secrets, reseed, pull) looks. It does not change what
the gateway process itself uses - export HERMES_HOME to match inside
the guest when you install it.
@@ -389,7 +379,7 @@ in
type = types.str;
default = "dev";
description = ''
"YYYY.MM.DD-<commit-sha>" reported by hermes-vm/hermes-ctl's
"YYYY.MM.DD-<commit-sha>" reported by `hermenix version`.
`version` subcommand. Normally supplied for free by this flake's own
`nixosModules.default` (from its git metadata) - the "dev" default
here only shows up if this module is imported some other way.
@@ -819,12 +809,10 @@ in
};
environment.systemPackages = [
# Nu scripts, shared with the standalone flake packages of the same
# name (packages.hermes-vm / packages.hermes-ctl) - see flake.nix. The
# per-host values that used to be spliced into the bash strings here
# via Nix interpolation are passed in as env vars instead, via
# makeWrapperArgs' --set, same mechanism already used for PATH below.
(pkgs.writers.writeNuBin "hermes-vm"
# Single consolidated CLI: `hermenix vm *` controls the VM,
# `hermenix ctl *` drives Hermes inside it. Per-host values are
# passed as env vars via makeWrapperArgs --set.
(pkgs.writers.writeNuBin "hermenix"
{
makeWrapperArgs = [
"--prefix"
@@ -835,9 +823,12 @@ in
socat
coreutils
gnutar
gnused
btrfs-progs
util-linux
restic
vim
nix
]))
"--set"
"HERMES_VSOCK_CID"
@@ -849,49 +840,26 @@ in
"HERMES_DISK_BASE_DIR"
cfg.disk.baseDir
"--set"
"HERMENIX_VERSION"
cfg.version
];
}
((builtins.readFile ../nu/lib/common.nu) + "\n" + (builtins.readFile ../nu/hermes-vm.nu)))
# ---------------------------------------------------------------
# Driving Hermes itself, as opposed to the VM around it.
# ---------------------------------------------------------------
(pkgs.writers.writeNuBin cfg.cliName
{
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(lib.makeBinPath (with pkgs; [
openssh
socat
coreutils
gnutar
vim
]))
"--set"
"HERMES_VSOCK_CID"
(toString cfg.vsockCid)
"--set"
"HERMES_GUEST_NAME"
cfg.name
"--set"
"HERMES_HOME_DIR"
cfg.hermesHome
"--set"
"HERMES_GATEWAY_UNIT"
cfg.gatewayUnit
"--set"
"HERMES_CLI_NAME"
cfg.cliName
"--set"
"HERMENIX_VERSION"
cfg.version
];
}
((builtins.readFile ../nu/lib/common.nu) + "\n" + (builtins.readFile ../nu/hermes-ctl.nu)))
(builtins.concatStringsSep "\n" (map builtins.readFile [
../nu/lib/common.nu
../nu/lib/guest.nu
../nu/host/setup.nu
../nu/host/migrate.nu
../nu/host/remote.nu
../nu/vm/vm.nu
../nu/ctl/ctl.nu
../nu/hermenix.nu
])))
];
};
}