Modular, context-aware and aspect-oriented dendritic Nix configurations. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ den.oeiuwq.com
configurations den dendritic nix aspect oriented

Add example to readme

+33 -2
+33 -2
README.md
··· 250 250 from any file, without any `mkIf`/`mkMerge` cluttering. The logic for 251 251 determining if the class takes effect is defined at a single place. 252 252 253 - > Example inspired by @Doc-Steve 253 + #### Example: Platform Aware `homeManager` classes 254 + 255 + This uses `pkgs.stdenv.isXYZ` to define `hmXYZ` classes, 256 + because some hm configurations might be only available 257 + on specific platforms. 258 + 259 + ```nix 260 + hmPlatforms = 261 + { class, aspect-chain }: 262 + den._.forward { 263 + each = [ "Linux" "Darwin" ]; 264 + fromClass = platform: "hm${platform}"; 265 + intoClass = _: "homeManager"; 266 + intoPath = _: [ ]; 267 + fromAspect = _: lib.head aspect-chain; 268 + guard = { pkgs, ... }: platform: lib.mkIf pkgs.stdenv."is${platform}"; 269 + adaptArgs = { config, ... }: { osConfig = config; }; 270 + }; 271 + 272 + den.hosts.x86_64-linux.igloo.users.tux = { }; 273 + den.hosts.aarch64-darwin.apple.users.tux = { }; 274 + 275 + den.aspects.tux = { 276 + includes = [ hmPlatforms ]; 277 + hmDarwin = { pkgs, ... }: { home.packages = [ pkgs.iterm2 ]; }; 278 + hmLinux = { pkgs, ... }: { home.packages = [ pkgs.wl-clipboard-rs ]; }; 279 + }; 280 + ``` 281 + 282 + #### Example: Class for Impermanence Capability 283 + 284 + > Inspired by @Doc-Steve 254 285 255 286 ```nix 256 287 # Aspects use the `persys` class without any conditional. And guard guarantees ··· 271 302 den.aspects.my-laptop.persys.hideMounts = true; 272 303 ``` 273 304 274 - ### User-defined Extensions to Den Framework. 305 + ### User-defined Extensions to Den context pipeline. 275 306 276 307 See example [`template/microvm`](https://den.oeiuwq.com/tutorials/microvm) for an example 277 308 of custom `den.ctx` and `den.schema` extensions for supporting