diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/mk_system.nix | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/lib/mk_system.nix b/lib/mk_system.nix index 2aca550..ff51fef 100644 --- a/lib/mk_system.nix +++ b/lib/mk_system.nix @@ -28,13 +28,15 @@ ] ++ nixpkgs.lib.optional (overlays != null) { nixpkgs.overlays = overlays; } ++ nixpkgs.lib.optionals (extraModules != null) extraModules; } - entryPoint - hardware - # TODO: import all modules (use mapModules?) - ../modules/flakes.nix - ../modules/nix.nix - ../modules/nixpkgs.nix - ] ++ nixpkgs.lib.optional (overlays != null) { nixpkgs.overlays = overlays; } - ++ nixpkgs.lib.optionals (extraModules != null) extraModules; - } -) + ); + + mkColmenaFromNixOSConfigurations = conf: + { + meta = { + # Colmena requirement. Will be overridden in nodeNixpkgs. + nixpkgs = import unstable { system = "x86_64-linux"; }; + nodeNixpkgs = builtins.mapAttrs (_: value: value.pkgs) conf; + nodeSpecialArgs = builtins.mapAttrs (_: value: value._module.specialArgs) conf; + }; + } // builtins.mapAttrs (_: value: { imports = value._module.args.modules; }) conf; +} |