tv pkgs: import files and dirs as overlays harder

This commit is contained in:
tv 2022-03-05 09:46:11 +01:00
parent ad6e957a51
commit 09fa6fbad6

View file

@ -3,12 +3,13 @@ with import <stockholm/lib>;
self: super:
# Import files and subdirectories like they are overlays.
foldl' mergeAttrs {}
fix
(foldl' (flip extends) (_: super)
(map
(name: import (./. + "/${name}") self super)
(name: import (./. + "/${name}"))
(filter
(name: name != "default.nix" && !hasPrefix "." name)
(attrNames (readDir ./.))))
(attrNames (readDir ./.)))))
//