add image generation

Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
2024-06-03 11:27:04 -04:00
committed by Alice Huston
parent 16a2f66612
commit 55b7e407f1
4 changed files with 59 additions and 0 deletions

View File

@ -3,8 +3,15 @@ let
inherit (inputs.nixpkgs.lib) mapAttrs;
getCfg = _: cfg: cfg.config.system.build.toplevel;
getFormat =
_: cfg: format:
cfg.config.formats.${format};
imageWrapper = format: mapAttrs getFormat outputs.nixosConfigurations format;
in
{
inherit (outputs) formatter devShells;
hosts = mapAttrs getCfg outputs.nixosConfigurations;
install-isos = imageWrapper "install-iso";
isos = imageWrapper "iso";
qcow = imageWrapper "qcow";
}