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;
|
lib = unstable.lib;
|
||||||
|
|
||||||
importAll = path:
|
importAll = path:
|
||||||
lib.forEach (
|
map
|
||||||
|
(module: (import module inputs))
|
||||||
|
(
|
||||||
builtins.filter (file: lib.hasSuffix ".nix" file)
|
builtins.filter (file: lib.hasSuffix ".nix" file)
|
||||||
(lib.filesystem.listFilesRecursive path)
|
(lib.filesystem.listFilesRecursive path)
|
||||||
)
|
);
|
||||||
(module: (import module inputs));
|
|
||||||
|
|
||||||
mkSystems = system: names:
|
mkSystems = system: names:
|
||||||
lib.genAttrs names (
|
lib.genAttrs names (
|
||||||
|
|
@ -104,14 +105,14 @@
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
// builtins.listToAttrs (
|
// builtins.listToAttrs (
|
||||||
lib.forEach (
|
map (module: {
|
||||||
builtins.filter (file: lib.hasSuffix ".nix" file)
|
|
||||||
(lib.filesystem.listFilesRecursive ./pkgs)
|
|
||||||
)
|
|
||||||
(module: {
|
|
||||||
name = lib.removeSuffix ".nix" (builtins.baseNameOf module);
|
name = lib.removeSuffix ".nix" (builtins.baseNameOf module);
|
||||||
value = pkgs.callPackage 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