mirror of
https://git.sr.ht/~magic_rb/cluster
synced 2024-11-25 17:46:14 +01:00
23 lines
615 B
Nix
23 lines
615 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 system; } // inputs)
|
|
);
|
|
pkgsWithFlakes = flakes: import nixpkgs
|
|
{
|
|
inherit system;
|
|
overlays = builtins.concatLists (forEach flakes (flake:
|
|
if builtins.hasAttr "overlay" flake then
|
|
[ flake.overlay ]
|
|
else
|
|
[]
|
|
));
|
|
};
|
|
}
|