remove image generation from Hydra
Signed-off-by: ahuston-0 <aliceghuston@gmail.com>
This commit is contained in:
parent
1b6b2d3bf2
commit
de3a027ab0
@ -144,7 +144,7 @@
|
|||||||
lib = self;
|
lib = self;
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
inherit (lib.rad-dev.systems) genSystems;
|
inherit (lib.rad-dev.systems) genSystems getImages;
|
||||||
inherit (self) outputs; # for hydra
|
inherit (self) outputs; # for hydra
|
||||||
in
|
in
|
||||||
rec {
|
rec {
|
||||||
@ -154,6 +154,12 @@
|
|||||||
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
formatter = forEachSystem (system: nixpkgs.legacyPackages.${system}.nixfmt-rfc-style);
|
||||||
|
|
||||||
nixosConfigurations = genSystems inputs src (src + "/systems");
|
nixosConfigurations = genSystems inputs src (src + "/systems");
|
||||||
|
images = {
|
||||||
|
install-iso = getImages nixosConfigurations "install-iso";
|
||||||
|
iso = getImages nixosConfigurations "iso";
|
||||||
|
qcow = getImages nixosConfigurations "qcow";
|
||||||
|
};
|
||||||
|
|
||||||
checks = import ./checks.nix { inherit inputs forEachSystem formatter; };
|
checks = import ./checks.nix { inherit inputs forEachSystem formatter; };
|
||||||
devShells = import ./shell.nix { inherit inputs forEachSystem checks; };
|
devShells = import ./shell.nix { inherit inputs forEachSystem checks; };
|
||||||
};
|
};
|
||||||
|
@ -3,15 +3,8 @@ let
|
|||||||
inherit (inputs.nixpkgs.lib) mapAttrs;
|
inherit (inputs.nixpkgs.lib) mapAttrs;
|
||||||
|
|
||||||
getCfg = _: cfg: cfg.config.system.build.toplevel;
|
getCfg = _: cfg: cfg.config.system.build.toplevel;
|
||||||
# getFormat =
|
|
||||||
# _: cfg: format:
|
|
||||||
# cfg.config.formats.${format};
|
|
||||||
imageWrapper = format: mapAttrs (_: cfg: cfg.config.formats.${format}) outputs.nixosConfigurations;
|
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
inherit (outputs) formatter devShells;
|
inherit (outputs) formatter devShells;
|
||||||
hosts = mapAttrs getCfg outputs.nixosConfigurations;
|
hosts = mapAttrs getCfg outputs.nixosConfigurations;
|
||||||
install-isos = imageWrapper "install-iso";
|
|
||||||
isos = imageWrapper "iso";
|
|
||||||
qcow = imageWrapper "qcow";
|
|
||||||
}
|
}
|
||||||
|
@ -213,4 +213,15 @@ rec {
|
|||||||
}
|
}
|
||||||
) (lib.rad-dev.lsdir path)
|
) (lib.rad-dev.lsdir path)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
# gets all the images of a specified format
|
||||||
|
#
|
||||||
|
# args:
|
||||||
|
# systems: a set of systems to generate (usually outputs.nixosConfigurations)
|
||||||
|
# format: a format to generate images for (must be a format compatible with
|
||||||
|
# nixos-generators or custom)
|
||||||
|
#
|
||||||
|
# type:
|
||||||
|
# AttrSet -> String -> AttrSet
|
||||||
|
getImages = systems: format: lib.mapAttrs (_: cfg: cfg.config.formats.${format}) systems;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user