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
at main 88 lines 2.9 kB view raw view rendered
1# denful - Dendritic Nix modules, enough to fill a den. 2 3Denful 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 5## Features 6 7* no need for nix wizardy. designed for beginners but your magic is of great use here. 8* minimalistic and inter-operable tools. incrementally enable just what you need. 9* supports all nix module classes. no special cases. 10* multi host definitions with high module re-use. 11* multi user support. 12* secrets management. 13* automatic website documentation. 14* experimental: flake-agnostic. can be used with or without flakes/flake.parts. 15 16## Facets 17 18You are free to cherry-pick any of our provided modules via `flake.modules.<class>.<name>`. 19 20However, we also provide higher modules (named **facets**). The concept is similar to that of _layers_ in 21editor-configurations like Spacemacs or plugin-bundles in other editor distributions. 22 23### `facet`s definition. 24 25This section is mostly useful for facet authors, but surely is of value for facet users. 26The following example just tries to show a facet structure and what it can do. 27 28Syntax here is that of [`flake.aspects`](https://github.com/vic/flake-aspects). 29resolved modules are be available at `flake.modules.<class>.niri` 30but people can also use `flake.aspects.niri` 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 75In some dendritic module of yours: 76 77```nix 78{ inputs, ... }: 79{ 80 imports = [ inputs.denful.modules.flake.niri ]; 81 82 flake.aspects.my-laptop = {aspects, ...}: { 83 # features of all facets that contribute to the anarchy aspect 84 includes = [ aspects.anarchy ]; 85 }; 86} 87``` 88