fix(#1199): add nix to hive-ci PATH for runner job execution

The gitea-actions-runner's host-scheme job processes use the
service's environment PATH, not the NixOS login-shell PATH.
Without this, 'nix flake check' and similar steps fail with
'nix: command not found'.

- add pkgs.nix to environment.systemPackages (ensures the binary
  is in /run/current-system/sw/bin)
- set explicit PATH on gitea-runner-hive service covering both
  /run/current-system/sw/bin and /nix/var/nix/profiles/default/bin
This commit is contained in:
atlas 2026-06-03 21:25:05 +02:00
commit 181535650b

View file

@ -268,10 +268,22 @@ in
systemd.services."gitea-runner-hive".wants = [ "hive-ci-register.service" ];
# git is required by the runner's checkout step.
# Everything else (nix, rust tools) is either part of NixOS
# by default or pulled in hermetically by nix flake check.
# nix is required for `nix flake check` / `nix build` workflow
# steps — it's not in the runner's job PATH by default since
# systemd services don't inherit the NixOS login-shell PATH.
# curl/jq in the register script use absolute store paths.
environment.systemPackages = [ pkgs.git ];
environment.systemPackages = [
pkgs.git
pkgs.nix
];
# Expose /run/current-system/sw/bin (where system packages
# land) and the nix profile bin dir to the runner's job
# execution environment. The gitea-actions-runner host scheme
# spawns job processes with the service's environment; without
# this PATH override, `nix` and `git` aren't visible to steps.
systemd.services."gitea-runner-hive".environment.PATH =
"/run/current-system/sw/bin:/nix/var/nix/profiles/default/bin:/usr/bin:/bin";
};
};
};