tangled
alpha
login
or
join now
da157.id
/
nix-config
0
fork
atom
0xda157's home-manager and nixos config
0
fork
atom
overview
issues
pulls
pipelines
simplify loadDir thingy
0xda157
3 months ago
9d24d244
9f9ca1f7
+1
-12
1 changed file
expand all
collapse all
unified
split
modules
flake
lib
default.nix
+1
-12
modules/flake/lib/default.nix
···
4
4
mkDisableOption = desc: lib.mkEnableOption desc // { default = true; };
5
5
6
6
loadDir =
7
7
-
dir:
8
8
-
builtins.readDir dir
9
9
-
|> lib.mapAttrsToList (
10
10
-
path: kind:
11
11
-
if kind == "directory" then
12
12
-
final.loadDir (dir + "/${path}")
13
13
-
else if path == "default.nix" then
14
14
-
[ (dir + "/default.nix") ]
15
15
-
else
16
16
-
[ ]
17
17
-
)
18
18
-
|> builtins.concatLists;
7
7
+
dir: lib.filesystem.listFilesRecursive dir |> builtins.filter (lib.hasSuffix "default.nix");
19
8
});
20
9
}