Context Transformation
Declarative pipeline that flows configuration through named context types — host, user, home, and custom. Learn More
Context Transformation
Declarative pipeline that flows configuration through named context types — host, user, home, and custom. Learn More
Context-Aware Aspects
Aspects are functions of context. A single aspect can target NixOS, Home-Manager, Darwin, and more — resolved automatically by context. Learn More
Context Pipeline
Stage-by-stage flow from host entry through user enumeration, HM detection, deduplication, and standalone homes. Learn More
Context System
Named context types with den.ctx schema — providers, includes, transformations, fan-out, and 10+ built-in context types.
Learn More
Parametric Aspects
den.lib.parametric with matching variants: atLeast, exactly, fixedTo, expands, withOwn, and take functions.
Learn More
Library vs Framework
Den’s dual nature — use the pure library for custom pipelines, or the framework for NixOS/Darwin/HM. All parts optional and replaceable. Learn More
Declare Hosts & Users
Define hosts with class detection, custom attributes, multiple users, standalone HM, base modules, and custom instantiation. Learn More
Configure Aspects
Static host config, context-aware includes, bidirectional user/host config, conditional config, global defaults, and named sub-aspects. Learn More
Schema Reference
Entity schemas for den.hosts, den.homes, den.base — host options, user options, home options, class detection, and instantiation.
Learn More
Output & Build
How Den builds nixosConfigurations, darwinConfigurations, and homeConfigurations. Output placement, main module resolution.
Learn More
Aspects Reference
Aspect attribute table, automatic creation from den.hosts/den.homes, resolution via flake-aspects, den.aspects and den.provides.
Learn More
Context Reference
All built-in context types in detail: host, user, default, home, hm-host, hm-user, maid-host, maid-user, hjem-host, hjem-user. Learn More
Home Manager Integration
Automatic HM detection, host-managed users, standalone HM, useGlobalPkgs, custom modules, osConfig access, and context hooks.
Learn More
Custom Classes
Create new Nix classes with den._.forward — hjem, maid, containers, VMs, guarded forward with conditions.
Learn More
User Classes
Default homeManager class, multiple user classes, per-class aspect resolution, OS user class forwarding.
Learn More
Bidirectional Config
Host-owned config applies to all users; user-owned config applies to all hosts. Static, parametric, and function-based. Learn More
Standalone Homes
Standalone homeConfigurations output — aspect config, custom username, den.ctx.home context, independent of any host.
Learn More
Hjem & Maid Classes
Built-in hjem and maid user class support — forwarding, merge with NixOS, automatic class detection. Learn More
OS User Class
Forward user descriptions, access OS args like pkgs, mergeable options across user/host/NixOS boundaries.
Learn More
define-user
den._.define-user — creates isNormalUser, sets home directory, works at user, host, or default level.
Learn More
primary-user
den._.primary-user — adds wheel and networkmanager groups to the primary user.
Learn More
user-shell
den._.user-shell — sets the user shell on both OS and Home-Manager simultaneously.
Learn More
unfree
den._.unfree — sets allowUnfreePredicate on both NixOS and Home-Manager.
Learn More
tty-autologin
den._.tty-autologin — creates a getty autologin service for the user.
Learn More
import-tree
den._.import-tree._.host — auto-imports host directories based on class, handles missing dirs gracefully.
Learn More
inputs' & self'
den._.inputs' and den._.self' — provide flake-parts special args (inputs', self') inside aspects.
Learn More
forward
den._.forward — forward aspect config into custom Nix classes with optional guard conditions.
Learn More
Batteries Guide
Overview and usage guide for all built-in batteries — when to use each one, practical examples, and composition patterns. Learn More
den.lib Reference
Full API: parametric, take, canTake, aspects, isFn, owned, statics, isStatic, __findFile.
Learn More
Angle Brackets
Opt-in <den/...> shorthand — access <den.lib>, <den/import-tree/host>, namespaces like <ns/path>.
Learn More
Namespaces
Define local namespaces, consume remote ones, nested provides, expose as flake output, merge multiple sources. Learn More
Cross-Provider Contexts
den.ctx.*.into.* cross-provider derivation — transform config between context types, per-value providers.
Learn More
Host Propagation
Full propagation: owned, static, lax, exact, atLeast contexts with default includes, hm-host, and hm-user stages. Learn More
Default Includes
den.default.includes — global defaults applied to all hosts/users, dynamic class resolution, hostname from context.
Learn More
Schema Base Modules
den.base.conf, den.base.host, den.base.user, den.base.home — extend entity schemas with custom modules.
Learn More
Custom Instantiation
Override instantiate for standalone HM with osConfig special arg, or custom deployment targets.
Learn More
Conditional Config
Conditional NixOS imports based on host/user attributes. Per-user HM config. Static aspects in defaults. Learn More
External Providers
Consume aspects from external flakes. Provider flake integration, deep nested namespace aspects. Learn More
Minimal Template
Smallest possible setup — one host, one user, no extra deps. Single flake.nix + modules/den.nix.
Learn More
Default Template
Recommended starting point with flake-parts, Home-Manager, and VM testing. Full file walkthrough. Learn More
Example Template
Advanced: cross-platform hosts, namespaces, angle brackets, bidirectional providers, custom routes. Learn More
No-Flake Template
Using Den with stable Nix via npins. No flakes required. Works with nix-maid. Learn More
Bogus / Bug Report
Bug reproduction template with nix-unit. denTest helper and available test fixtures.
Learn More
Templates Overview
Comparison table of all 6 templates, quick start commands, project structure. Learn More
Migration Guide
Incremental adoption from flake-parts, import existing modules, mix Den with existing nixosSystem, recommended path.
Learn More
Debugging
builtins.trace, builtins.break, REPL inspection, manually resolving aspects, common issues.
Learn More
CI Test Suite
40+ test files covering every feature. Run tests, write new ones, understand test harness (denTest, evalDen).
Learn More
Motivation & History
Why Den exists — from vic/vix through blueprint, snowfall, and flake-parts to dendritic design. Learn More
Community
GitHub Discussions, Zulip Chat, Matrix channel, real-world examples, ecosystem projects. Learn More
Contributing
Report bugs, contribute PRs, run tests, format code. Learn More
Sponsor
Support Den development via GitHub Sponsors. Learn More