2021-03-14 10:10:51 +03:00
|
|
|
{ lib, dev, ... }:
|
|
|
|
|
|
|
|
{ dir, _import ? base: import "${dir}/${base}.nix" }:
|
|
|
|
dev.mapFilterAttrs
|
|
|
|
(_: 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-03-30 22:47:54 +03:00
|
|
|
(dev.safeReadDir dir)
|