forked from mirrors/nixpkgs
Merge pull request #246120 from jakeschurch/add-proxmox-image-addl-disk-size-override
proxmox-image: add additionalDiskSpace parameter as input to make-disk-image.nix
This commit is contained in:
commit
71e3934d82
|
@ -147,6 +147,14 @@ with lib;
|
|||
defaultText = lib.literalExpression ''if config.proxmox.qemuConf.bios == "seabios" then "legacy" else "efi"'';
|
||||
example = "hybrid";
|
||||
};
|
||||
additionalSpace = mkOption {
|
||||
type = types.str;
|
||||
default = "512M";
|
||||
description = lib.mdDoc ''
|
||||
Additional disk space to be added to the image.
|
||||
Defaults to 512M (Megabytes), Suffix can also be specified with `G` (gigabyte) or `K` (kilobyte).
|
||||
'';
|
||||
};
|
||||
filenameSuffix = mkOption {
|
||||
type = types.str;
|
||||
default = config.proxmox.qemuConf.name;
|
||||
|
@ -197,7 +205,7 @@ with lib;
|
|||
];
|
||||
system.build.VMA = import ../../lib/make-disk-image.nix {
|
||||
name = "proxmox-${cfg.filenameSuffix}";
|
||||
inherit partitionTableType;
|
||||
inherit (cfg) partitionTableType additionalSpace;
|
||||
postVM = let
|
||||
# Build qemu with PVE's patch that adds support for the VMA format
|
||||
vma = (pkgs.qemu_kvm.override {
|
||||
|
|
Loading…
Reference in a new issue