refactor: rename templates to agent.nix/ruth.nix, sweep stale name refs
This commit is contained in:
parent
7ad2bb9211
commit
7c9d72b9ca
13 changed files with 28 additions and 28 deletions
|
|
@ -701,7 +701,7 @@ struct OtelConfig {
|
|||
/// Read the hive-wide OTEL config from env, or `None` when OTEL is off.
|
||||
/// Mirrors `hive_ca_source` — host state surfaced to the meta renderer
|
||||
/// so it can bake build-time `hyperhive.otel.*` config into each agent
|
||||
/// (the per-agent options harness-base.nix consumes). Returns `None`
|
||||
/// (the per-agent options the harness modules consume). Returns `None`
|
||||
/// when the endpoint signal is absent so the renderer emits no
|
||||
/// `hyperhive.otel.*` lines and agents keep the disabled default.
|
||||
fn otel_config() -> Option<OtelConfig> {
|
||||
|
|
@ -914,7 +914,7 @@ where
|
|||
// re-locks THIS input instead of re-hashing the whole `hyperhive`
|
||||
// source. Threaded to each agent below as `hyperhive.docs.source`.
|
||||
// Empty = hive-c0re not built with the option wired up (legacy);
|
||||
// agents then keep the harness-base default (`pkgs.hyperhive-docs`).
|
||||
// agents then keep the harness default (`hyperhive.packages.reference-docs`).
|
||||
if !docs_flake.is_empty() {
|
||||
// `flake = false`: the docs/ tree is a plain source (no flake.nix),
|
||||
// so nix must treat it as raw source, not evaluate it as a flake.
|
||||
|
|
@ -971,8 +971,8 @@ where
|
|||
"#,
|
||||
);
|
||||
// Point the in-container docs dir (`$HIVE_DOCS_DIR`) at the narrow
|
||||
// `hyperhive-docs` input instead of the harness-base default
|
||||
// (`pkgs.hyperhive-docs`, built from the now-docs-stripped source).
|
||||
// `hyperhive-docs` input instead of the harness default
|
||||
// (`hyperhive.packages.reference-docs`, built from the now-docs-stripped source).
|
||||
// `inputs."hyperhive-docs"` is reachable via the outputs `@inputs`
|
||||
// capture. Emitted only when the input exists (docs_flake non-empty).
|
||||
if !docs_flake.is_empty() {
|
||||
|
|
@ -1000,7 +1000,7 @@ where
|
|||
);
|
||||
}
|
||||
// Hive-wide OTEL stats export (`services.hyperhive.otel.*`): inject the
|
||||
// build-time `hyperhive.otel.*` config harness-base.nix consumes (its
|
||||
// build-time `hyperhive.otel.*` config the harness modules consume (its
|
||||
// otelEnv + otelExecStart wrapper + LoadCredential). Host-driven, so
|
||||
// the same config lands on every agent; emitted only when enabled.
|
||||
// Mirrors the CA-cert injection above — host state -> build-time agent
|
||||
|
|
@ -1055,7 +1055,7 @@ where
|
|||
# `iris`, `root`, …). UID auto-assigned by NixOS; the
|
||||
# per-agent override here is what makes
|
||||
# `hyperhive.user.name` match the agent's identity
|
||||
# instead of the harness-base default of `"agent"`.
|
||||
# instead of the harness default of `"agent"`.
|
||||
hyperhive.user.name = name;
|
||||
programs.git.config.user = {
|
||||
name = name;
|
||||
|
|
@ -1416,7 +1416,7 @@ mod tests {
|
|||
"old-style follows must not appear when flake args are set:\n{out}"
|
||||
);
|
||||
// the narrow docs source is its own non-flake input, and each
|
||||
// agent's docs dir resolves from it rather than pkgs.hyperhive-docs.
|
||||
// agent's docs dir resolves from it rather than hyperhive.packages.reference-docs.
|
||||
assert!(
|
||||
out.contains("hyperhive-docs.url = \"path:/nix/store/bbbb-hyperhive-docs-source\""),
|
||||
"expected hyperhive-docs input url:\n{out}"
|
||||
|
|
@ -1434,7 +1434,7 @@ mod tests {
|
|||
#[test]
|
||||
fn render_flake_omits_docs_input_when_docs_flake_empty() {
|
||||
// Legacy / not-wired-up: empty docs_flake emits no docs input and
|
||||
// leaves each agent on the harness-base default (pkgs.hyperhive-docs).
|
||||
// leaves each agent on the harness default (hyperhive.packages.reference-docs).
|
||||
let out = render_flake(
|
||||
"github:example/hyperhive",
|
||||
"",
|
||||
|
|
@ -1674,7 +1674,7 @@ mod tests {
|
|||
// services.hyperhive.otel.* -> HYPERHIVE_OTEL_* on hive-c0re's unit
|
||||
// -> injected as build-time hyperhive.otel.* into every agent. With
|
||||
// no endpoint signal, no hyperhive.otel lines are emitted (agents
|
||||
// keep the harness-base disabled default).
|
||||
// keep the the harness modules disabled default).
|
||||
//
|
||||
// SAFETY: single-threaded mutation of process env vars no other
|
||||
// test asserts on; restored before returning.
|
||||
|
|
|
|||
Loading…
Reference in a new issue