mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-22 08:04:20 +01:00
23 lines
608 B
Nix
23 lines
608 B
Nix
{ nixpkgs, pkgs, system, inputs }:
|
|
with pkgs.lib; {
|
|
flakes = path: modules: genAttrs modules (module:
|
|
let
|
|
self = (import (path + "/${module}/flake.nix")).outputs (inputs // { inherit self; });
|
|
in
|
|
self
|
|
);
|
|
dockerImages = path: modules: genAttrs modules (module:
|
|
import (path + "/${module}") ({ inherit pkgs; } // inputs)
|
|
);
|
|
pkgsWithFlakes = flakes: import nixpkgs
|
|
{
|
|
inherit system;
|
|
overlays = builtins.concatLists (forEach flakes (flake:
|
|
if builtins.hasAttr "overlay" flake then
|
|
[ flake.overlay ]
|
|
else
|
|
[]
|
|
));
|
|
};
|
|
}
|