nest
What it does
Section titled “What it does”nest models your fleet as a DOM and resolves configuration the way a browser resolves styles.
- Infrastructure as a DOM: your fleet is an attrset hierarchy (environments, roles, regions); parents propagate scalar attributes to children, so
systemorenvis set once and inherited - Traits over repetition: traits classify nodes and form dependency DAGs.
needspulls in dependencies (aservertrait can pullnginx,ssh,firewall), andneededByinjects in reverse - Rules over inheritance: rules match nodes by selector and contribute NixOS (or other aspect oriented) module fragments. nest hands the collected list to
nixosSystem, solib.mkForce,lib.mkDefault, type checking, and conflict detection all work as usual - CSS selectors for targeting: match by trait, name, attribute, DOM ancestry, predicate, or boolean combination, with string syntax like
#lb-prod,.nixos,[env=prod],prod > web - Synthesis for derived data: compute derived node attributes and inject virtual children that participate in rule matching like any other node
Role in the ecosystem
Section titled “Role in the ecosystem”nest is the fleet and infrastructure layer. Because its rules emit ordinary NixOS / Aspect oriented module fragments, it composes with the rest of the ecosystem, a CSS-flavored way to target and assemble configuration across many machines.
Source Code Documentation Support this project