clan-config: move jsonschema lib to clanLib
This commit is contained in:
@@ -1,17 +1,16 @@
|
||||
{ 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
|
||||
{
|
||||
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);
|
||||
|
||||
jsonschema = import ./jsonschema.nix { inherit lib; };
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user