mirror of
https://github.com/Gerg-L/nixos.git
synced 2025-12-10 00:43:56 -05:00
map not lib.forEach
This commit is contained in:
parent
845f07f108
commit
4d8e6420e5
1 changed files with 9 additions and 8 deletions
17
flake.nix
17
flake.nix
|
|
@ -49,11 +49,12 @@
|
|||
lib = unstable.lib;
|
||||
|
||||
importAll = path:
|
||||
lib.forEach (
|
||||
map
|
||||
(module: (import module inputs))
|
||||
(
|
||||
builtins.filter (file: lib.hasSuffix ".nix" file)
|
||||
(lib.filesystem.listFilesRecursive path)
|
||||
)
|
||||
(module: (import module inputs));
|
||||
);
|
||||
|
||||
mkSystems = system: names:
|
||||
lib.genAttrs names (
|
||||
|
|
@ -104,14 +105,14 @@
|
|||
};
|
||||
}
|
||||
// builtins.listToAttrs (
|
||||
lib.forEach (
|
||||
builtins.filter (file: lib.hasSuffix ".nix" file)
|
||||
(lib.filesystem.listFilesRecursive ./pkgs)
|
||||
)
|
||||
(module: {
|
||||
map (module: {
|
||||
name = lib.removeSuffix ".nix" (builtins.baseNameOf module);
|
||||
value = pkgs.callPackage module {};
|
||||
})
|
||||
(
|
||||
builtins.filter (file: lib.hasSuffix ".nix" file)
|
||||
(lib.filesystem.listFilesRecursive ./pkgs)
|
||||
)
|
||||
);
|
||||
}
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue