2021-04-18 04:35:05 +03:00
|
|
|
{ lib, ... }:
|
2021-03-14 10:10:51 +03:00
|
|
|
|
|
|
|
{ dir, _import ? base: import "${dir}/${base}.nix" }:
|
2021-04-18 04:35:05 +03:00
|
|
|
lib.mapFilterAttrs
|
2021-03-14 10:10:51 +03:00
|
|
|
(_: v: v != null)
|
|
|
|
(n: v:
|
|
|
|
if n != "default.nix" && lib.hasSuffix ".nix" n && v == "regular"
|
|
|
|
then
|
|
|
|
let name = lib.removeSuffix ".nix" n; in lib.nameValuePair (name) (_import name)
|
|
|
|
else
|
|
|
|
lib.nameValuePair ("") (null))
|
2021-04-18 04:35:05 +03:00
|
|
|
(lib.safeReadDir dir)
|