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
8
fork

Configure Feed

Select the types of activity you want to include in your feed.

derive intoPath from fromClass

+5 -10
+2 -10
templates/flake-parts-modules/modules/custom-classes.nix
··· 46 46 # NOTE: this is different from Den's flake-packages class. 47 47 { 48 48 fromClass = _: "packages"; 49 - intoPath = _: [ "packages" ]; 50 49 } 51 50 52 51 { 53 52 fromClass = _: "files"; 54 - intoPath = _: [ 55 - "files" 56 - ]; 57 - adapterModule = { }; 58 53 } 59 54 60 55 # a default `devshell` class ··· 68 63 69 64 { 70 65 fromClass = _: "treefmt"; 71 - intoPath = _: [ "treefmt" ]; 72 66 } 73 67 74 68 { ··· 79 73 ]; 80 74 # test helpers 81 75 adaptArgs = 82 - { pkgs, ... }: 76 + args: 83 77 let 84 78 igloo = config.flake.nixosConfigurations.igloo.config; 85 79 tux = igloo.users.users.tux; 86 80 in 87 - { 88 - inherit pkgs igloo tux; 89 - }; 81 + args.config.allModuleArgs // { inherit igloo tux; }; 90 82 } 91 83 ]; 92 84 };
+3
templates/flake-parts-modules/modules/perSystem-forward.nix
··· 12 12 adaptArgs = { config, ... }: config.allModuleArgs; 13 13 } 14 14 // forwardArgs 15 + // lib.optionalAttrs (!forwardArgs ? intoPath) { 16 + intoPath = x: [ (forwardArgs.fromClass x) ]; 17 + } 15 18 ); 16 19 17 20 ctx.flake-parts = { };