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

docs: improve inputs' and self' descriptions (#118)

improve docs of #117

authored by

Heitor Augusto and committed by
GitHub
14c34be3 4d439f49

+32 -16
+16 -8
modules/aspects/provides/inputs.nix
··· 3 3 den.provides.inputs' = den.lib.parametric { 4 4 description = '' 5 5 Provides the `flake-parts` `inputs'` (the flake's `inputs` with system pre-selected) 6 - as a top-level module argument. This allows modules to access per-system 7 - flake outputs without needing `pkgs.stdenv.hostPlatform.system`. 6 + as a top-level module argument. 7 + 8 + This allows modules to access per-system flake outputs without needing 9 + `pkgs.stdenv.hostPlatform.system`. 8 10 9 11 ## Usage 10 12 11 - # makes inputs' available to modules in my-aspect 12 - den.aspects.my-aspect.includes = [ den._.inputs' ]; 13 + **Global (Recommended):** 14 + Apply to all hosts, users, and homes. 13 15 14 - # module implementation 15 - { inputs', ... }: { 16 - # use inputs' as needed 17 - } 16 + den.default.includes = [ den._.inputs' ]; 17 + 18 + **Specific:** 19 + Apply only to a specific host, user, or home aspect. 20 + 21 + den.aspects.my-laptop.includes = [ den._.inputs' ]; 22 + den.aspects.alice.includes = [ den._.inputs' ]; 23 + 24 + **Note:** If specified in a user aspect (e.g., `alice`) that is integrated into a host (not standalone), 25 + `inputs'` will be available to **both** the user's Home Manager configuration and the **Host's** configuration. 18 26 ''; 19 27 20 28 includes = [
+16 -8
modules/aspects/provides/self.nix
··· 3 3 den.provides.self' = den.lib.parametric { 4 4 description = '' 5 5 Provides the `flake-parts` `self'` (the flake's `self` with system pre-selected) 6 - as a top-level module argument. This allows modules to access per-system 7 - flake outputs without needing `pkgs.stdenv.hostPlatform.system`. 6 + as a top-level module argument. 7 + 8 + This allows modules to access per-system flake outputs without needing 9 + `pkgs.stdenv.hostPlatform.system`. 8 10 9 11 ## Usage 10 12 11 - # makes self' available to modules in my-aspect 12 - den.aspects.my-aspect.includes = [ den._.self' ]; 13 + **Global (Recommended):** 14 + Apply to all hosts, users, and homes. 13 15 14 - # module implementation 15 - { self', ... }: { 16 - # use self' as needed 17 - } 16 + den.default.includes = [ den._.self' ]; 17 + 18 + **Specific:** 19 + Apply only to a specific host, user, or home aspect. 20 + 21 + den.aspects.my-laptop.includes = [ den._.self' ]; 22 + den.aspects.alice.includes = [ den._.self' ]; 23 + 24 + **Note:** If specified in a user aspect (e.g., `alice`) that is integrated into a host (not standalone), 25 + `self'` will be available to **both** the user's Home Manager configuration and the **Host's** configuration. 18 26 ''; 19 27 20 28 includes = [