diff --git a/hive-c0re/src/container_view.rs b/hive-c0re/src/container_view.rs index ef7d5459..4c4e7a08 100644 --- a/hive-c0re/src/container_view.rs +++ b/hive-c0re/src/container_view.rs @@ -300,7 +300,7 @@ fn read_active_model(name: &hive_types::Ident) -> Option { } /// Host-side hive + swarm display names, read from the c0re service's -/// own process env. The `hive-c0re.nix` module sets these from +/// own process env. The hyperhive NixOS module sets these from /// `services.hyperhive.hiveName` + `services.hyperhive.swarm.name` /// (the hive names itself; the swarm it joins is named one level out). /// The agent-side diff --git a/hive-c0re/src/dashboard/mod.rs b/hive-c0re/src/dashboard/mod.rs index c95b36fd..c0a62716 100644 --- a/hive-c0re/src/dashboard/mod.rs +++ b/hive-c0re/src/dashboard/mod.rs @@ -115,7 +115,8 @@ pub async fn serve( webhook_secret: Option, ) -> Result<()> { // API-only: the gateway static-serves the dashboard dist and proxies - // non-static requests here (see hive-gateway.nix). Unmatched paths 404. + // non-static requests here (see `nix/host-modules/hive-gateway/vhosts.nix`). + // Unmatched paths 404. // No static fallback needed here either. Every route (SSE streams // included — `utoipa::path` can document an SSE body as an opaque // `text/event-stream` string, it just can't model individual frame diff --git a/hive-c0re/src/dashboard/state_snapshot.rs b/hive-c0re/src/dashboard/state_snapshot.rs index 6e75ce50..4b806fbb 100644 --- a/hive-c0re/src/dashboard/state_snapshot.rs +++ b/hive-c0re/src/dashboard/state_snapshot.rs @@ -76,7 +76,7 @@ pub(super) struct StateSnapshot { /// Whether the matrix GUI is reachable at `/matrix/`. Sourced from /// `HIVE_MATRIX_GUI_ENABLED` env var (set by the c0re NixOS module /// when `services.hyperhive.swarm.matrix.gui.enable` is on). The gateway - /// (hive-gateway.nix) does the actual `/matrix/` static serving; + /// (`nix/host-modules/hive-gateway/vhosts.nix`) does the actual `/matrix/` static serving; /// this flag is just an availability signal for iris's dashboard /// chrome so the `M4TR1X →` tab doesn't flash when the GUI is off. matrix_gui_enabled: bool, diff --git a/hive-c0re/src/gateway_nginx.rs b/hive-c0re/src/gateway_nginx.rs index 7f94e802..dd75a6a4 100644 --- a/hive-c0re/src/gateway_nginx.rs +++ b/hive-c0re/src/gateway_nginx.rs @@ -97,7 +97,7 @@ fn render(names: &[String], frontend_dir: Option<&str>) -> String { // Split mode: try to serve files from the nix-store dist first; // fall through to the agent daemon for anything not found there. // - // `frontend` is a nix store path injected at build time by hive-c0re.nix + // `frontend` is a nix store path injected at build time by the hyperhive module // (`HIVE_AGENT_FRONTEND_DIR = "${cfg.frontend}/agent"`). Nix store paths // are of the form `/nix/store/-` — only [a-z0-9/._-], never // shell metacharacters — so interpolating directly into the nginx config diff --git a/hive-c0re/src/matrix.rs b/hive-c0re/src/matrix.rs index 7054cf7a..d524e0ce 100644 --- a/hive-c0re/src/matrix.rs +++ b/hive-c0re/src/matrix.rs @@ -16,7 +16,7 @@ use reqwest::StatusCode; use crate::coordinator::Coordinator; /// Client-server API base this daemon provisions against, from -/// `HIVE_MATRIX_API_URL` (set by `hive-c0re.nix` from +/// `HIVE_MATRIX_API_URL` (set by the hyperhive NixOS module from /// `services.hyperhive.swarm.matrix.apiUrl`). /// /// `None` means **this hive has no homeserver to provision against** and diff --git a/hive-c0re/src/paths.rs b/hive-c0re/src/paths.rs index c45d761b..88eb2366 100644 --- a/hive-c0re/src/paths.rs +++ b/hive-c0re/src/paths.rs @@ -31,12 +31,14 @@ use std::path::{Path, PathBuf}; pub use hive_host_sock::{AGENTS_ROOT, GATEWAY_HTPASSWD, HOST_SOCKET, agent_state_dir}; /// Root of all hive-c0re persistent state. -// nix: bind-mount source `services.hyperhive.c0re.statePath` (hive-c0re.nix) — must match. +// nix: the same literal is written in `nix/host-modules/hive-c0re/default.nix` — must match. +// Not option-driven: there is no `statePath` option, the path is hardcoded both sides. pub const STATE_ROOT: &str = "/var/lib/hyperhive"; /// `/run/hyperhive` — hive-c0re's runtime root (host admin socket, the /// per-agent runtime dirs). Regenerated each boot; not persistent state. -// nix: `RuntimeDirectory=hyperhive` on the hive-c0re service (hive-c0re.nix) — must match. +// nix: `RuntimeDirectory=hyperhive` on the hive-c0re service +// (`nix/host-modules/hive-c0re/default.nix`) — must match. // priv-sock: `hive_priv_sock::AGENT_RUNTIME_ROOT` is `RUNTIME_ROOT + "/agents"` and must // stay in sync; the privsep boundary prevents importing across the crate. pub const RUNTIME_ROOT: &str = "/run/hyperhive"; @@ -247,7 +249,8 @@ pub fn gateway_agents_conf() -> PathBuf { /// `forge-core-token` — the hive-c0re forge account API token. A `&str` /// (used in `Path::new` + user-facing `format!` messages), so it stays a /// const rather than a `PathBuf` fn. -// nix: bind-mounted into the forge container / read at provisioning (hive-forge.nix) — must match. +// nix: read at provisioning; the same literal is in +// `nix/host-modules/hive-c0re/default.nix` and `nix/host-modules/hive-ci.nix` — must match. pub const FORGE_CORE_TOKEN: &str = "/var/lib/hyperhive/forge-core-token"; /// `matrix-register-token` — shared matrix registration token. diff --git a/hive-c0re/src/server.rs b/hive-c0re/src/server.rs index 36049d75..2a469429 100644 --- a/hive-c0re/src/server.rs +++ b/hive-c0re/src/server.rs @@ -160,7 +160,7 @@ async fn dispatch(req: &HostRequest, coord: Arc) -> HostResponse { HostRequest::AgentExists { name } => HostResponse::agent_exists(agent_exists(name)?), HostRequest::AgentStatus => handle_agent_status(&coord).await, // The hive domain + per-surface public URLs are injected into - // c0re's service env by hive-c0re.nix; surface them so the + // c0re's service env by the hyperhive module; surface them so the // operator CLI can fill in this hive's own identity (the // federation peer-config block) and open the web surfaces // (`hivectl open`). @@ -1038,7 +1038,7 @@ fn is_broad_scope(scope: &LifecycleScope) -> bool { } /// Assemble this hive's domain + browser-facing web URLs from c0re's -/// service env (injected by hive-c0re.nix). Each field is `None` when its +/// service env (injected by the hyperhive NixOS module). Each field is `None` when its /// surface isn't browser-reachable (domain unset, forge not behind the /// gateway, matrix GUI off), so the CLI can hint precisely instead of /// opening a dead link. Scheme matches the existing `HIVE_FORGE_PUBLIC_URL` diff --git a/hive-c0re/src/stats/hive_stats.rs b/hive-c0re/src/stats/hive_stats.rs index 93bf6615..5cdce915 100644 --- a/hive-c0re/src/stats/hive_stats.rs +++ b/hive-c0re/src/stats/hive_stats.rs @@ -115,7 +115,7 @@ pub type PriceTable = HashMap; /// Sonnet 4.x, Haiku 4.5); `cache_write` uses the 1-hour cache-TTL price, /// which is the default through the Claude subscription the agents run /// on. Keep in sync with the `services.hyperhive.modelPrices` nix default -/// (`nix/modules/hive-c0re.nix`). +/// (`nix/host-modules/hive-c0re/options.nix`). fn builtin_prices(model: &str) -> Prices { let m = model.to_ascii_lowercase(); if m.contains("opus") { diff --git a/hive-forge/src/main.rs b/hive-forge/src/main.rs index 830dad12..24d7aba0 100644 --- a/hive-forge/src/main.rs +++ b/hive-forge/src/main.rs @@ -13,8 +13,8 @@ //! `forge-