Expand description
§consortium-nix
NixOS deployment orchestration for consortium.
This crate provides the deployment pipeline for NixOS and nix-darwin systems, replacing colmena. It consumes fleet configuration (produced by the Nix library) and orchestrates the evaluate → build → copy → activate pipeline using consortium’s DAG executor for maximum parallelism with per-host pipelining.
§Architecture
The deployment pipeline has four stages, executed as a DAG:
For each host:
eval(host) → build(host) → copy(host) → activate(host)Stages run in parallel across hosts (up to concurrency limits), and each host can advance independently — host A can be copying while host B is still building.
Builder health checking (health) validates remote builders before use.
Re-exports§
pub use config::DeployAction;pub use config::DeploymentNode;pub use config::DeploymentPlan;pub use config::FleetConfig;pub use config::ProfileType;pub use error::NixError;pub use error::Result;
Modules§
- activate
- Profile activation — switch NixOS/nix-darwin systems to new configurations.
- build
- Nix build orchestration — build closures locally or with distributed builders.
- cascade
- Cascade closure-distribution primitive.
- cascade_
events - Cascade event protocol — fine-grained events emitted by the cascade coordinator as the run progresses.
- cascade_
executor - Production
RoundExecutorimplementations — wrap realnix copysubprocesses, runnable against actual nixlab hosts. - cascade_
integration - Glue between the cascade primitive and the per-host fleet deploy.
- cascade_
strategies - Cost-aware cascade strategies built on petgraph.
- cascade_
trace - Trace recorder and exporters for cascade runs.
- config
- Configuration types for NixOS deployment.
- copy
- Closure copying — transfer built closures to deployment targets.
- error
- Error types for NixOS deployment operations.
- eval
- Nix evaluation — resolve toplevel store paths and detect changes.
- health
- Builder health checking — probe builders for SSH connectivity and Nix store access.
- tasks
- DagTask implementations for each NixOS deployment phase.
Structs§
- Deploy
Report - Summary of a deployment run.
Functions§
- deploy
- Run the full deployment pipeline using the DAG executor.
- deploy_
with_ cascade - Cascade-driven deploy: same eval/build/activate as
deploy, but the per-hostnix copystage is replaced by a single whole-fleet cascade that distributes each toplevel peer-to-peer.