mirror of
https://github.com/nix-community/disko
synced 2024-11-10 06:14:14 +00:00
make-disk-image: allow pkgs to be overriden by disko configuration
This is needed when the nixosConfig you're building for modifies nixpkgs options that lead to evaluation failing unnecessarily
This commit is contained in:
parent
f5cc4b55e5
commit
de015d2a44
2 changed files with 10 additions and 1 deletions
|
@ -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
|
||||
|
|
|
@ -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 = ''
|
||||
|
|
Loading…
Reference in a new issue