flake-aspects
What it does
Section titled “What it does”flake-aspects transposes <aspect>.<class> definitions into <class>.<aspect> — the standard flake.modules layout that lib.evalModules expects. On top of that, it provides a rich composition model:
- Composable DAGs — aspects declare
includesto form dependency graphs - Nestable sub-aspects — tree-structured aspects via
provides/_, not flat string keys - Parametric providers — curried functions that produce aspects based on parameters
__functorpattern — override and customize any aspect- Cross-class
forward— share configuration between NixOS, Darwin, Home-Manager, and any custom class
Example
Section titled “Example”{ # An aspect that provides NixOS and Home-Manager configs gaming = { includes = [ base ]; # dependency, not a string reference nixos = { pkgs, ... }: { environment.systemPackages = [ pkgs.steam ]; }; homeManager = { pkgs, ... }: { home.packages = [ pkgs.lutris ]; }; };
# Parametric: a function that returns an aspect user-shell = shell: { nixos = { pkgs, ... }: { users.users.default.shell = pkgs.${shell}; }; };}Who uses it
Section titled “Who uses it”- den — built entirely on flake-aspects for its aspect resolution
- Independent users — some people use flake-aspects directly without den, building their own Dendritic setups
- Mixable with existing non-dendritic infrastructure