mirror of
https://github.com/nix-community/home-manager.git
synced 2026-01-12 01:59:37 +08:00
modules: allow root level nix files
More flexibility in allowing root level files to import, for those that don't need nesting. Signed-off-by: Austin Horstman <khaneliman12@gmail.com>
This commit is contained in:
@@ -77,9 +77,11 @@ let
|
||||
++ (lib.concatMap
|
||||
(
|
||||
dir:
|
||||
lib.pipe dir [
|
||||
builtins.readDir
|
||||
(lib.filterAttrs (_path: kind: kind == "directory"))
|
||||
lib.pipe (builtins.readDir dir) [
|
||||
(lib.filterAttrs (path: _kind: !lib.hasPrefix "_" path))
|
||||
(lib.filterAttrs (
|
||||
_path: kind: kind == "directory" || (kind == "regular" && lib.hasSuffix ".nix" _path)
|
||||
))
|
||||
(lib.mapAttrsToList (path: _kind: lib.path.append dir path))
|
||||
]
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user