cherry-pickable Dendritic modules to extend your config easily. like a lazyvim-distribution but for dendritic nix. Discussions: https://oeiuwq.zulipchat.com/join/nqp26cd4kngon6mo3ncgnuap/ dendrix.oeiuwq.com/Dendritic.html
reusable dedritic nix modules configuration distribution

Enhance README with facets definition and examples

Added detailed explanation of facets and their usage.

authored by oeiuwq.com and committed by

GitHub 10a6834d fd6ae53d

+74
+74
README.md
··· 1 1 # denful - Dendritic Nix modules, enough to fill a den. 2 2 3 + Denful provides lots of [flake.parts](https://flake.parts/) modules that you can mix in your existing [Dendritic](https://vic.github.io/dendrix/Dendritic.html) configurations. 4 + 3 5 ## Features 4 6 5 7 * no need for nix wizardy. designed for beginners but your magic is of great use here. ··· 10 12 * secrets management. 11 13 * automatic website documentation. 12 14 * experimental: flake-agnostic. can be used with or without flakes/flake.parts. 15 + 16 + ## Facets 17 + 18 + You are free to cherry-pick any of our provided modules via `flake.modules.<class>.<name>`. 19 + 20 + However, we also provide higher modules (named **facets**). The concept is similar to that of _layers_ in 21 + editor-configurations like Spacemacs or plugin-bundles in other editor distributions. 22 + 23 + ### `facet`s definition. 24 + 25 + This section is mostly useful for facet authors, but surely is of value for facet users. 26 + The following example just tries to show a facet structure and what it can do. 27 + 28 + Syntax here is that of [`flake.aspects`](https://github.com/vic/flake-aspects). 29 + resolved modules are be available at `flake.modules.<class>.niri-desktop` 30 + but people can also use `flake.aspects.niri-desktop` if desired (eg, as an aspect dependency). 31 + 32 + ```nix 33 + # facets/niri.nix 34 + { inputs, lib, ... }: 35 + { 36 + flake.aspects.niri = { aspects, ... }: { 37 + description = '' 38 + Niri: a scrollable-tiling WM (https://github.com/YaLTeR/niri) 39 + 40 + Configured via https://github.com/sodiboo/niri-flake. 41 + ''; 42 + 43 + # the `flake` class module contributes to your flake, 44 + # for example by adding inputs or caches via `github:vic/flake-file`. 45 + flake = { 46 + flake-file.inputs.niri-flake = { 47 + url = lib.mkDefault "github:sodiboo/niri-flake"; 48 + inputs.nixpkgs.follows = "nixpkgs"; 49 + }; 50 + flake-file.nixConfig = { 51 + extra-substituters = [ "https://niri.cachix.org" ]; 52 + extra-trusted-public-keys = [ "niri.cachix.org-1:Wv0OmO7PsuocRKzfDoJ3mulSl7Z6oezYhGhR+3W2964=" ]; 53 + }; 54 + 55 + # it can also import aditional flake modules. 56 + # flake-file.inputs.foo-dep.url = "..."; 57 + # imports = [ inputs.foo-dep.flakeModule ]; 58 + 59 + # or define/enhance another aspect: anarchy is our omarchy like aspect. 60 + flake.aspects.anarchy = { 61 + includes = [ aspects.niri ]; 62 + }; 63 + }; 64 + 65 + # the nixos class enhances os-level stuff for the `niri` aspect. 66 + nixos = { 67 + imports = [ inputs.niri-flake.nixosModules.niri ]; 68 + }; 69 + }; 70 + } 71 + ``` 72 + 73 + ### `facet` usage 74 + 75 + In some dendritic module of yours: 76 + 77 + ```nix 78 + { inputs, ... }: 79 + { 80 + imports = [ inputs.denful.modules.flake.niri ]; 81 + flake.aspects.my-laptop = {aspects, ...}: { 82 + includes = [ aspects.anarchy ]; 83 + }; 84 + } 85 + ``` 86 +