From 95a556e2807c29f92683128197d9099d1479cf37 Mon Sep 17 00:00:00 2001 From: atlas Date: Mon, 22 Jun 2026 20:22:52 +0200 Subject: [PATCH] fix(#1906): add git + openssh to the hive-priv build-env PATH MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit `nixos-container update ` (run by the hive-priv root helper) invokes nix, which shells out by bare name to `git` whenever it has to fetch or re-resolve a git-source flake input, and to `ssh` to dispatch builds to remote builders. The hive-priv service `path` had neither, so an agent whose config carries a git-source input — or a stale flake.lock whose node URL no longer matches the flake's declared input, forcing nix to re-resolve at eval — fails the build with `executing "git": No such file or directory`, and remote-builder dispatch fails with `Could not find executable 'ssh'`. Add `pkgs.gitMinimal` + `pkgs.openssh` to the path. Latent-bug fix: nix legitimately needs both for any git-source input / remote build. Surfaced by the bitburner agent's build failing on a git-source input re-resolution. --- nix/modules/hive-c0re.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/nix/modules/hive-c0re.nix b/nix/modules/hive-c0re.nix index 0f9ee5c8..aae957bb 100644 --- a/nix/modules/hive-c0re.nix +++ b/nix/modules/hive-c0re.nix @@ -982,9 +982,20 @@ in # findutils already in the default unit PATH. Without `nixos-container` # on PATH every container op fails ENOENT, which `build_all` silently # swallows into an empty list ("no managed containers"). + # + # `nix` itself shells out by bare name too: `git` whenever it has to + # fetch/re-resolve a git-source flake input (an agent.nix with a + # `git+https://…` input, or a stale flake.lock whose node URL no longer + # matches the flake's declared input → nix re-resolves at eval), and + # `ssh` to dispatch to remote builders (`nix.buildMachines` / + # `ssh-ng://`). Without these on PATH `nixos-container update` dies with + # `executing "git": No such file or directory` / `Could not find + # executable 'ssh'` — the agent build fails before it starts. path = [ pkgs.nixos-container pkgs.nix # nix, nix-env, nix-instantiate — create + update + pkgs.gitMinimal # git — nix fetches/re-resolves git-source flake inputs + pkgs.openssh # ssh — nix dispatches builds to remote builders pkgs.util-linux # umount (nsenter is hardcoded in the script) pkgs.e2fsprogs # chattr pkgs.btrfs-progs # btrfs subvolume create/delete — Ensure/DeleteAgentSubvolume