diff --git a/lib/make-disk-image.nix b/lib/make-disk-image.nix index e1f7e36..9979b21 100644 --- a/lib/make-disk-image.nix +++ b/lib/make-disk-image.nix @@ -1,6 +1,6 @@ { nixosConfig , diskoLib -, pkgs ? nixosConfig.pkgs +, pkgs ? nixosConfig.config.disko.imageBuilderPkgs , lib ? pkgs.lib , name ? "${nixosConfig.config.networking.hostName}-disko-images" , extraPostVM ? nixosConfig.config.disko.extraPostVM diff --git a/module.nix b/module.nix index 33b58dc..321cc0e 100644 --- a/module.nix +++ b/module.nix @@ -12,6 +12,15 @@ in options.disko = { imageBuilderKernel = lib.mkOption { type = lib.types.package; + imageBuilderPkgs = lib.mkOption { + type = lib.types.attrs; + description = '' + the pkgs instance used when building disk images via make-disk-image.nix. + Useful when the config's kernel won't boot in the image-builder. + ''; + default = pkgs; + example = lib.literalExpression "pkgs"; + }; imageBuilderKernelPackages = lib.mkOption { type = lib.types.attrs; description = ''