Phase 5b: per-agent config flakes; approve validates + advances commit

This commit is contained in:
müde 2026-05-14 23:09:35 +02:00
parent 22b65d35f3
commit 433c0d212e
6 changed files with 182 additions and 25 deletions

View file

@ -31,9 +31,10 @@ struct Cli {
enum Cmd {
/// Run the coordinator daemon.
Serve {
/// Flake reference for the agent base template.
#[arg(long, default_value = "/etc/hyperhive#agent-base")]
agent_flake: String,
/// URL of the hyperhive flake. Inlined into each per-agent
/// `flake.nix` as the `hyperhive` input.
#[arg(long, default_value = "/etc/hyperhive")]
hyperhive_flake: String,
/// Path to the sqlite message store.
#[arg(long, default_value = "/var/lib/hyperhive/broker.sqlite")]
db: PathBuf,
@ -65,8 +66,11 @@ async fn main() -> Result<()> {
let cli = Cli::parse();
match cli.cmd {
Cmd::Serve { agent_flake, db } => {
let coord = Arc::new(Coordinator::open(&db, agent_flake)?);
Cmd::Serve {
hyperhive_flake,
db,
} => {
let coord = Arc::new(Coordinator::open(&db, hyperhive_flake)?);
manager_server::start(coord.clone())?;
server::serve(&cli.socket, coord).await
}