diff --git a/hive-c0re/src/broker.rs b/hive-c0re/src/broker.rs index dbff0190..78d28104 100644 --- a/hive-c0re/src/broker.rs +++ b/hive-c0re/src/broker.rs @@ -56,8 +56,8 @@ impl Broker { std::fs::create_dir_all(parent) .with_context(|| format!("create db parent {}", parent.display()))?; } - let conn = Connection::open(path) - .with_context(|| format!("open broker db {}", path.display()))?; + let conn = + Connection::open(path).with_context(|| format!("open broker db {}", path.display()))?; conn.execute_batch(SCHEMA).context("apply broker schema")?; let (events, _) = broadcast::channel(EVENT_CHANNEL); Ok(Self { diff --git a/hive-c0re/src/dashboard.rs b/hive-c0re/src/dashboard.rs index 5f24bfa9..d8e89d01 100644 --- a/hive-c0re/src/dashboard.rs +++ b/hive-c0re/src/dashboard.rs @@ -81,10 +81,7 @@ async fn messages_stream( Sse::new(stream).keep_alive(KeepAlive::default()) } -async fn post_approve( - State(state): State, - AxumPath(id): AxumPath, -) -> Response { +async fn post_approve(State(state): State, AxumPath(id): AxumPath) -> Response { match actions::approve(&state.coord, id).await { Ok(()) => Redirect::to("/").into_response(), Err(e) => error_response(&format!("approve {id} failed: {e:#}")), diff --git a/nix/modules/hive-c0re.nix b/nix/modules/hive-c0re.nix index 0f2badb3..9852d4a1 100644 --- a/nix/modules/hive-c0re.nix +++ b/nix/modules/hive-c0re.nix @@ -57,7 +57,10 @@ in systemd.services.hive-c0re = { description = "hyperhive coordinator daemon"; wantedBy = [ "multi-user.target" ]; - path = [ "/run/current-system/sw" ]; + path = [ + pkgs.git + "/run/current-system/sw" + ]; serviceConfig = { ExecStart = "${cfg.package}/bin/hive-c0re --socket /run/hyperhive/host.sock serve --hyperhive-flake ${cfg.hyperhiveFlake} --dashboard-port ${toString cfg.dashboardPort}"; Restart = "on-failure";