Declarative Pipeline
Data flows through context stages — host definitions through user enumeration to domain-specific resolution.
Den has a dual nature:
As a library — den.lib provides domain-agnostic context transformation pipelines that activate flake-aspects. You can build your own configuration graphs for any Nix class.
As a framework — Den provides host/user/home schemas, batteries, and a declarative pipeline for the common NixOS/Darwin/Home-Manager case.
graph LR H["den.ctx.host"] --> U["den.ctx.user (per user)"] U --> HM["homeManager class"] H --> OS["nixos/darwin class"]
Declarative Pipeline
Data flows through context stages — host definitions through user enumeration to domain-specific resolution.
Bidirectional Config
Hosts configure users. Users contribute to hosts. Aspects flow in both directions automatically.
Batteries Included
define-user, primary-user, user-shell, unfree, import-tree, inputs’, forward — opt-in aspects for common tasks.
Any Nix Class
NixOS, Darwin, Home-Manager, Hjem, Maid, NixVim, Terranix — anything configurable through Nix modules.
{ den, ... }: { den.x86_64-linux.hosts.igloo.users.tux = { };
den.igloo.nixos.networking.hostName = "warm-home"; den.tux.homeManager = { pkgs, ... }: { home.packages = [ pkgs.cowsay ]; }; den.tux.includes = [ (den.provides.user-shell "fish") ];
den.default.nixos.system.stateVersion = "25.11"; den.default.homeManager.home.stateVersion = "25.11";}