16 lines
No EOL
716 B
Nix
16 lines
No EOL
716 B
Nix
{ pkgs, lib, system, commons, ... }:
|
|
let
|
|
# upstream distro images
|
|
upstreamImagesJSON = lib.importJSON ./upstream.json;
|
|
upstreamImages = lib.mapAttrs (name: src: pkgs.fetchurl src) upstreamImagesJSON.${system};
|
|
templates = (import ./templates.nix) { inherit pkgs lib system commons; };
|
|
customs = (import ./customs.nix) { inherit pkgs lib system commons upstreamImages templates; };
|
|
mergeUpstreamAndCustomImages =
|
|
name: upstreamImage:
|
|
let
|
|
customImages = lib.optionalAttrs (lib.hasAttr "${name}" customs) customs.${name};
|
|
in
|
|
customImages // { upstream = upstreamImage; };
|
|
|
|
images = lib.mapAttrs mergeUpstreamAndCustomImages upstreamImages;
|
|
in images // { inherit templates; } |