Skip to content

Commit d86c47a

Browse files
committed
Import only first level layers/*.nix files.
1 parent 4f12a62 commit d86c47a

File tree

5 files changed

+21
-52
lines changed

5 files changed

+21
-52
lines changed

default.nix

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2,17 +2,20 @@ inputs:
22
let
33
inherit (inputs.nixpkgs-lib) lib;
44

5-
dendrix = community // {
6-
inherit layers sources;
7-
};
5+
dendrix =
6+
community
7+
// layers
8+
// {
9+
inherit sources;
10+
};
811

912
sources = import ./dev/npins;
1013
community = lib.mapAttrs (_: r: r.import-tree) ev.config.dendrix.community;
1114
layers = ev.config.dendrix.layers;
1215

1316
module = inputs.import-tree [
14-
./dev/modules/community
15-
./dev/modules/layers
17+
./dev/community
18+
((inputs.import-tree.addPath ./dev/layers).match ".+/dev/layers/[^/]+.nix")
1619
];
1720

1821
ev = lib.modules.evalModules {

dev/default.nix

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
inputs:
2+
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
3+
inputs.import-tree [
4+
./modules
5+
./community
6+
((inputs.import-tree.addPath ./layers).match ".+/layers/[^/]+.nix")
7+
]
8+
)

dev/flake.lock

Lines changed: 3 additions & 36 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

dev/flake.nix

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,5 @@
11
{
2-
outputs =
3-
inputs:
4-
inputs.flake-parts.lib.mkFlake { inherit inputs; } (
5-
inputs.import-tree [
6-
./modules
7-
./community
8-
./layers
9-
]
10-
);
11-
2+
outputs = inputs: import ./. inputs;
123
inputs = {
134
dendrix.flake = false;
145
dendrix.url = "path:..";

flake.nix

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2+
outputs = inputs: import ./. inputs;
23
inputs.import-tree.url = "github:vic/import-tree";
34
inputs.nixpkgs-lib.url = "github:nix-community/nixpkgs.lib";
4-
outputs = inputs: import ./. inputs;
55
}

0 commit comments

Comments
 (0)