all nuing

This commit is contained in:
ari committed 2026-09-16 22:09:42 -04:00
1 parent e99744f628
commit 1e1da2f7a1
7 files changed
+443 -211

No files matched your search

+54 -1
View File
@@ -15,6 +15,14 @@
let
system = "x86_64-linux";
pkgs = nixpkgs.legacyPackages.${system};
# nu/lib/common.nu holds helpers shared by every host-side tool below
# (say/note/ok/warn/die/step/ask/confirm/confirm-word/shquote,
# vsock-ssh-args, run-argv). It's never `use`d at runtime - once a
# script is wrapped into a single file in the Nix store, a relative
# `use` isn't reliably resolvable - so it's concatenated in here
# instead, in front of each tool's own script.
nuScript = path: (builtins.readFile ./nu/lib/common.nu) + "\n" + (builtins.readFile path);
in
{
nixosModules.default = ./modules/host.nix;
@@ -55,7 +63,52 @@
]))
];
}
(builtins.readFile ./nu/hermenix.nu);
(nuScript ./nu/hermenix.nu);
# Host-side control of the VM itself (start/stop/console/snapshots/
# backups) - see nu/hermes-vm.nu. Defaults match
# services.hermenix's own option defaults; modules/host.nix wraps
# this same script with the per-host values baked in via env vars
# instead (see its own writeNuBin calls).
hermes-vm = pkgs.writers.writeNuBin "hermes-vm"
{
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(pkgs.lib.makeBinPath (with pkgs; [
openssh
socat
coreutils
gnutar
btrfs-progs
util-linux
restic
]))
];
}
(nuScript ./nu/hermes-vm.nu);
# Host-side control of Hermes itself, inside the guest (identity,
# config, secrets, gateway service, passthrough to its own `hermes`
# CLI) - see nu/hermes-ctl.nu. Same per-host-defaults/module-override
# relationship as hermes-vm above.
hermes-ctl = pkgs.writers.writeNuBin "hermes-ctl"
{
makeWrapperArgs = [
"--prefix"
"PATH"
":"
(pkgs.lib.makeBinPath (with pkgs; [
openssh
socat
coreutils
gnutar
vim
]))
];
}
(nuScript ./nu/hermes-ctl.nu);
default = self.packages.${system}.hermenix;
};