diff --git a/guest/common.nix b/guest/common.nix index c1acb5d..7e27e0b 100644 --- a/guest/common.nix +++ b/guest/common.nix @@ -26,6 +26,21 @@ let stateDir = "/var/lib/hermes"; useHostCache = cachePublicKey != ""; + + # Shared between environment.systemPackages (the interactive PATH) and + # hermes-install's own `path` (below). environment.systemPackages does NOT + # propagate into systemd services' PATH on its own - a bare `curl` inside + # a systemd script only resolves if the unit is explicitly given a `path`, + # which is what actually failed here (confirmed live: "curl: command not + # found" from inside hermes-install, despite curl being in + # systemPackages). The installer also shells out to git/node/python/gcc + # internally, so the service needs all of this, not just curl. + hermesInstallDeps = with pkgs; [ + git curl jq ripgrep fd tree htop + uv nodejs ffmpeg + direnv nix-direnv nix-output-monitor + gcc gnumake pkg-config python3 xz + ]; in { # Both disks are virtio-blk, including the one this very image boots from @@ -197,6 +212,7 @@ in wants = [ "network-online.target" ]; wantedBy = [ "multi-user.target" ]; unitConfig.ConditionPathExists = "!${stateDir}/.hermes-installed"; + path = hermesInstallDeps; serviceConfig = { Type = "oneshot"; User = "hermes"; @@ -219,14 +235,7 @@ in ]; }; - environment.systemPackages = with pkgs; [ - git curl jq ripgrep fd tree htop - uv nodejs ffmpeg - direnv nix-direnv nix-output-monitor - # Hermes's installer wants these: a C/C++ toolchain for native Node - # modules (node-pty), plus xz for Node tarball extraction. - gcc gnumake pkg-config python3 xz - ]; + environment.systemPackages = hermesInstallDeps; programs.direnv = { enable = true;