{"repo":"mightyiam/dendritic","free":true,"listed":false,"github":"https://github.com/mightyiam/dendritic","clone":"git clone https://github.com/mightyiam/dendritic.git","description":"A Nixpkgs module system usage pattern","language":null,"stars":601,"topics":["flake-parts","nix","nix-flake","pattern","template"],"license":"MIT","category":"saas-starters-boilerplates","readme_excerpt":"The Dendritic Pattern A Nixpkgs module system usage pattern Testimonials I adore this idea by @mightyiam of every file is a top-level module and I think I will adopt it everywhere. —Daniel Firth (modified from source) Massive, very interesting! —Pol Dellaiera (source) I’ve adopted your method. Really preferring it. —gerred (source) Background NixOS, home-manager and nix-darwin are popular projects that allow the user to produce derivations that can be customized by evaluating a Nixpkgs module system configuration. Figuring out a practical and expressive architecture for a codebase that provides configurations had proven to cost many a Nix user numerous rounds of re-architecturing. Factors contributing to the complexity of the matter: - Multiple configurations - Sharing of modules across configurations - Multiple configuration classes ( nixos , home-manager , etc.) - Configuration nesting such as home-manager within NixOS or within nix-darwin - Cross-cutting concerns that span multiple configuration classes - Accessing values such as functions, constants and packages across files Required skills Understanding the dendritic pattern strictly depends on fair comprehension of the following: - Nix language - Nixpkgs module system - The deferredModule type The pattern Top-level and lower-level modules and configurations The dendritic pattern reconciles these factors using yet another application of the Nixpkgs module system—a top-level configuration . The top-level configuration fac","default_branch":null,"files":null,"tree":[],"storefront":"/r/mightyiam","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/mightyiam/dendritic/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}