feat(#2170): split docs/ into its own meta-flake input

This commit is contained in:
damocles 2026-07-04 11:26:13 +02:00
commit b5acd60cf5
5 changed files with 148 additions and 18 deletions

View file

@ -59,6 +59,11 @@ pub struct Coordinator {
/// URL of the hyperhive flake (no fragment). Inlined into per-agent
/// `flake.nix` files as `inputs.hyperhive.url`.
pub hyperhive_flake: String,
/// URL of the narrow `docs/` source (no fragment). Inlined into the
/// meta `flake.nix` as `inputs.hyperhive-docs.url` and threaded to
/// each agent as `hyperhive.docs.source`. Its own store path
/// so doc edits don't re-hash `hyperhive_flake`.
pub hyperhive_docs_flake: String,
/// Store-path URL of the nixpkgs to wire into the meta flake as
/// `inputs.nixpkgs.url`. Populated by `--nixpkgs-flake` (set by the
/// NixOS module to `"path:${pkgs.path}"` so the meta flake always
@ -197,6 +202,11 @@ pub struct Coordinator {
#[serde(default)]
pub struct HiveEnv {
pub hyperhive_flake: String,
/// Store-path URL of the narrow `docs/` source, wired into the meta
/// flake as `inputs.hyperhive-docs.url` and threaded to each agent as
/// `hyperhive.docs.source`. Separate from `hyperhive_flake`
/// so a doc edit only re-locks this input, not the whole source.
pub hyperhive_docs_flake: String,
pub nixpkgs_flake: String,
pub dashboard_port: u16,
pub operator_pronouns: String,
@ -211,6 +221,7 @@ impl Default for HiveEnv {
fn default() -> Self {
Self {
hyperhive_flake: "/etc/hyperhive".to_string(),
hyperhive_docs_flake: String::new(),
nixpkgs_flake: String::new(),
dashboard_port: 7000,
operator_pronouns: "she/her".to_string(),
@ -425,6 +436,7 @@ impl Coordinator {
) -> Result<Self> {
let HiveEnv {
hyperhive_flake,
hyperhive_docs_flake,
nixpkgs_flake,
dashboard_port,
operator_pronouns,
@ -467,6 +479,7 @@ impl Coordinator {
build_logs,
audit_log,
hyperhive_flake,
hyperhive_docs_flake,
nixpkgs_flake,
dashboard_port,
operator_pronouns,
@ -496,6 +509,7 @@ impl Coordinator {
pub fn hive_env(&self) -> HiveEnv {
HiveEnv {
hyperhive_flake: self.hyperhive_flake.clone(),
hyperhive_docs_flake: self.hyperhive_docs_flake.clone(),
nixpkgs_flake: self.nixpkgs_flake.clone(),
dashboard_port: self.dashboard_port,
operator_pronouns: self.operator_pronouns.clone(),