Glossary
Den introduces several domain-specific terms. This glossary defines them in Den’s context.
aspect
Section titled “aspect”A composable attrset containing per-class modules (nixos, homeManager, darwin, etc.), an includes list, and provides sub-aspects. Aspects are the primary organizational unit in Den — each one groups related configuration across multiple module systems under a single name.
See: Aspects
battery
Section titled “battery”A reusable aspect provider shipped with Den under den.batteries (aliased den.provides and den._). Batteries solve common configuration tasks like user creation, hostname setting, and home environment integration.
See: Batteries
A Nix module evaluation domain — nixos, darwin, homeManager, hjem, maid, user, os, or any custom class. Classes determine which module system evaluates the config. Not the same as entity kind.
See: Aspects
context
Section titled “context”The pipeline data shape ({ host }, { host, user }, { home }) flowing through the resolution pipeline. Den context is a real function argument carrying entity references, not NixOS module arguments ({ config, pkgs, lib, ... }) and not _module.args.
See: Context pipeline
deferredModule
Section titled “deferredModule”A NixOS module system concept — a module whose evaluation is delayed until the target configuration is assembled. Schema entries and resolved aspects are deferredModules.
See: NixOS module system
entity
Section titled “entity”A typed data declaration — a host, user, or home. Entities carry metadata (name, system, class) and freeform attributes accessible to aspects and policy resolve functions.
See: Entities
entity kind
Section titled “entity kind”The type of an entity: host, user, or home (or custom kinds via den.schema). Entity kinds drive policy dispatch. Not the same as class.
See: Entities
freeform
Section titled “freeform”Attributes on an entity that have no declared option — arbitrary key-value data accessible via context. Freeform attributes let entities carry ad-hoc metadata without schema changes.
See: Entities
includes
Section titled “includes”A list of aspect references on an aspect or stage. Declares dependencies — “this aspect needs these other aspects to be resolved alongside it.” The full set of includes forms a DAG.
See: Aspects
parametric
Section titled “parametric”A context-aware function whose argument shape determines when it applies: { host }: ... runs only in host contexts, { host, user }: ... only in user contexts. Den introspects function arguments and dispatches automatically — bare functions in includes work without any wrapper. The explicit den.lib.parametric wrapper is deprecated; the pipeline handles dispatch automatically.
See: Parametric aspects
policy
Section titled “policy”A context-driven function that declares a directed edge between entity kinds. A policy takes a context ({ host, ... }, { host, user, ... }, etc.) and returns a list of effects (includes, routes, provides); it fires when its argument signature is satisfied by the scope context. Policies are about entity topology, not stages.
See: Policies
provides
Section titled “provides”Overloaded term with two distinct meanings. On an aspect, provides defines named sub-aspects that dependents can include (aliased _). At the top level, den.provides is an alias for den.batteries, the reusable aspect providers shipped with Den.
provider
Section titled “provider”An aspect intended for reuse via includes. den.batteries.* (batteries) are the built-in providers, but any aspect can serve as a provider.
See: Batteries
resolution
Section titled “resolution”The process of walking an entity’s aspect graph, applying parametric dispatch, collecting per-class modules, and producing a final NixOS/HM/Darwin module. Driven by the fx pipeline.
See: Context pipeline