11.stylix/stylix/autoload.nix
2023-01-30 22:56:57 +01:00

14 lines
389 B
Nix

{ lib }:
# string -> [ path ]
# List include path for either nixos modules or hm modules
for:
builtins.concatLists
(lib.mapAttrsToList
(path: kind:
if kind == "directory"
then let
file = "${../modules}/${path}/${for}.nix";
in (if builtins.pathExists file then [ file ] else [ ])
else [ ])
(builtins.readDir ../modules))