feat(#1003): inject pkgs.path into meta flake as explicit nixpkgs.url

meta flake was using `nixpkgs.follows = "hyperhive/nixpkgs"` but
`hyperhive` is a store-path input, so nix resolves hyperhive's own
pinned lock rather than the host's follows-substituted version.
When an operator sets `inputs.hyperhive.inputs.nixpkgs.follows =
"nixpkgs"` in their host flake, the meta flake was silently ignoring
it and using hyperhive's pinned nixpkgs instead.

Fix: hive-c0re.nix injects `--nixpkgs-flake path:${pkgs.path}` into
the daemon's ExecStart. `pkgs` IS the host's nixpkgs when follows is
set; otherwise it's hyperhive's own pin — so the meta flake gets the
right nixpkgs in both cases. render_flake emits `nixpkgs.url = "..."`
(explicit) when nixpkgs_flake is non-empty, falling back to the old
`follows` form when empty for backward compat.
This commit is contained in:
atlas 2026-06-01 22:23:33 +02:00
commit fe5a41288d
9 changed files with 97 additions and 37 deletions

View file

@ -87,6 +87,7 @@ async fn dispatch(req: &HostRequest, coord: Arc<Coordinator>) -> HostResponse {
match lifecycle::spawn(
name,
&coord.hyperhive_flake,
&coord.nixpkgs_flake,
&agent_dir,
&proposed_dir,
&applied_dir,
@ -151,6 +152,7 @@ async fn dispatch(req: &HostRequest, coord: Arc<Coordinator>) -> HostResponse {
let result = lifecycle::rebuild(
name,
&coord.hyperhive_flake,
&coord.nixpkgs_flake,
&agent_dir,
&applied_dir,
&claude_dir,