flake: filter source directory to only contain directories and nix files
and not potential patch files which would be tried to be interpreted as nix code
This commit is contained in:
parent
12f7d68519
commit
b294b83325
|
@ -8,7 +8,8 @@
|
|||
outputs = { self, nixpkgs-lib, ... }:
|
||||
let
|
||||
inherit (nixpkgs-lib) lib;
|
||||
ls = dir: lib.attrNames (builtins.readDir (./. + "/${dir}"));
|
||||
src = builtins.filterSource (path: type: type == "directory" || lib.hasSuffix ".nix" (baseNameOf path)) ./.;
|
||||
ls = dir: lib.attrNames (builtins.readDir (src + "/${dir}"));
|
||||
fileList = dir: map (file: ./. + "/${dir}/${file}") (ls dir);
|
||||
importDirToKey = dir: args: lib.listToAttrs (map
|
||||
(file: {
|
||||
|
|
Loading…
Reference in New Issue