forked from fabian/nix_config
doctrine/lib: rename importAll.nix -> import-all.nix
This commit is contained in:
parent
2fe1f36eb9
commit
8cc6c13cf5
2 changed files with 1 additions and 1 deletions
|
@ -1,21 +0,0 @@
|
|||
{
|
||||
lib,
|
||||
root,
|
||||
exclude ? ["default"],
|
||||
}:
|
||||
with builtins;
|
||||
with lib;
|
||||
# http://chriswarbo.net/projects/nixos/useful_hacks.html
|
||||
let
|
||||
basename = removeSuffix ".nix";
|
||||
|
||||
isMatch = name: type:
|
||||
(hasSuffix ".nix" name || type == "directory")
|
||||
&& ! elem (basename name) exclude;
|
||||
|
||||
entry = name: _: {
|
||||
name = basename name;
|
||||
value = import (root + "/${name}");
|
||||
};
|
||||
in
|
||||
mapAttrs' entry (filterAttrs isMatch (readDir root))
|
Loading…
Add table
Add a link
Reference in a new issue