forked from clan/clan-core
18 lines
372 B
Nix
18 lines
372 B
Nix
{ lib, ... }:
|
|
let
|
|
clanLib = {
|
|
findNixFiles = folder:
|
|
lib.mapAttrs'
|
|
(name: type:
|
|
if
|
|
type == "directory"
|
|
then
|
|
lib.nameValuePair name "${folder}/${name}"
|
|
else
|
|
lib.nameValuePair (lib.removeSuffix ".nix" name) "${folder}/${name}"
|
|
)
|
|
(builtins.readDir folder);
|
|
};
|
|
in
|
|
clanLib
|