Build all images with nix-snapshotter

This commit is contained in:
Pim Kunis 2024-12-19 21:07:30 +01:00
parent ab3a068066
commit 708e6b4336
14 changed files with 125 additions and 184 deletions

View file

@ -1,36 +1,10 @@
{
self,
pkgs,
nixpkgs,
nixng,
globals,
nix-snapshotter,
...
}: {
mkNixNGImage = name: file: let
stream =
(import file {
inherit nixpkgs nixng globals;
inherit (nixng) nglib;
})
.config
.system
.build
.ociImage
.stream;
in
pkgs.stdenv.mkDerivation {
name = "${name}.tar";
src = stream;
dontUnpack = true;
buildPhase = ''
$src > $out
'';
};
nixSnapshotterRef = imagePath: "nix:0${imagePath}";
mkNixNGImage2 = name:
mkNixNGImage = name:
(nix-snapshotter.packages.${pkgs.stdenv.system}.nix-snapshotter.buildImage {
inherit name;
resolvedByNix = true;