Watch
0
0
Fork
You've already forked hyperhive
0

read the running rev and the hyperhive flake from /etc files, not the unit

This commit is contained in:
atlas 2026-11-06 04:44:27 +01:00 • committed by mara
commit aed7c8451a

View file

@ -25,6 +25,7 @@
//! The store identity comes from the `BAO_*` environment. The queue client
//! secret is read at start and again when authelia refuses it, the forge token
//! once per build, both from the store under that identity.
//! The hyperhive source is read again for each build ([`hyperhive_flake`]).
use std::future::Future;
use std::path::PathBuf;
@ -45,6 +46,7 @@ use swarm_wire::builder::{
};
mod archetypes;
mod hyperhive_flake;
mod metrics;
mod nix_build;
mod push;
@ -96,7 +98,7 @@ async fn main() -> Result<()> {
let builder = Arc::new(nix_build::Builder {
nix: PathBuf::from(var("NIX")?),
check_flake: var("CHECK_FLAKE")?,
hyperhive: var("HYPERHIVE_FLAKE")?,
hyperhive: hyperhive_flake::HyperhiveFlake::load()?,
nixpkgs: var("NIXPKGS_FLAKE")?,
forge_url: forge_url()?,
config_org: var("CONFIG_ORG")?,
@ -1005,7 +1007,7 @@ mod tests {
Arc::new(nix_build::Builder {
nix: self.0.join("nix"),
check_flake: "/nix/store/c-check".to_owned(),
hyperhive: "/nix/store/h-source".to_owned(),
hyperhive: hyperhive_flake::HyperhiveFlake::fixed("/nix/store/h-source"),
nixpkgs: "/nix/store/n-source".to_owned(),
forge_url: "https://forge.example".to_owned(),
config_org: "agent-configs".to_owned(),
@ -1694,7 +1696,7 @@ mod tests {
fn evaluator(fake: &Fake) -> archetypes::Evaluator {
archetypes::Evaluator {
nix: fake.0.join("nix"),
hyperhive: "/nix/store/h-source".to_owned(),
hyperhive: hyperhive_flake::HyperhiveFlake::fixed("/nix/store/h-source"),
nixpkgs: "/nix/store/n-source".to_owned(),
deadline: Duration::from_secs(30),
}