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: self: super:
# Import files and subdirectories like they are overlays. # Import files and subdirectories like they are overlays.
foldl' mergeAttrs {} fix
(map (foldl' (flip extends) (_: super)
(name: import (./. + "/${name}") self super) (map
(filter (name: import (./. + "/${name}"))
(name: name != "default.nix" && !hasPrefix "." name) (filter
(attrNames (readDir ./.)))) (name: name != "default.nix" && !hasPrefix "." name)
(attrNames (readDir ./.)))))
// //