forked from mirrors/nixpkgs
treewide: use auto diskSize for make-disk-image
This commit is contained in:
parent
cd0ffd3f5f
commit
f3aa040bcb
|
@ -10,7 +10,6 @@ with lib;
|
||||||
|
|
||||||
system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
|
system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
|
||||||
inherit lib config pkgs;
|
inherit lib config pkgs;
|
||||||
diskSize = 8192;
|
|
||||||
format = "qcow2";
|
format = "qcow2";
|
||||||
configFile = pkgs.writeText "configuration.nix"
|
configFile = pkgs.writeText "configuration.nix"
|
||||||
''
|
''
|
||||||
|
|
|
@ -40,8 +40,9 @@ in {
|
||||||
};
|
};
|
||||||
|
|
||||||
sizeMB = mkOption {
|
sizeMB = mkOption {
|
||||||
type = types.int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = if config.ec2.hvm then 2048 else 8192;
|
default = "auto";
|
||||||
|
example = 8192;
|
||||||
description = "The size in MB of the image";
|
description = "The size in MB of the image";
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -12,8 +12,8 @@ with lib;
|
||||||
|
|
||||||
system.build.openstackImage = import ../../../lib/make-disk-image.nix {
|
system.build.openstackImage = import ../../../lib/make-disk-image.nix {
|
||||||
inherit lib config;
|
inherit lib config;
|
||||||
|
additionalSpace = "1024M";
|
||||||
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
||||||
diskSize = 8192;
|
|
||||||
format = "qcow2";
|
format = "qcow2";
|
||||||
configFile = pkgs.writeText "configuration.nix"
|
configFile = pkgs.writeText "configuration.nix"
|
||||||
''
|
''
|
||||||
|
|
|
@ -9,8 +9,9 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
virtualisation.azureImage.diskSize = mkOption {
|
virtualisation.azureImage.diskSize = mkOption {
|
||||||
type = with types; int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 2048;
|
default = "auto";
|
||||||
|
example = 2048;
|
||||||
description = ''
|
description = ''
|
||||||
Size of disk image. Unit is MB.
|
Size of disk image. Unit is MB.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -10,8 +10,9 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
virtualisation.digitalOceanImage.diskSize = mkOption {
|
virtualisation.digitalOceanImage.diskSize = mkOption {
|
||||||
type = with types; int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 4096;
|
default = "auto";
|
||||||
|
example = 4096;
|
||||||
description = ''
|
description = ''
|
||||||
Size of disk image. Unit is MB.
|
Size of disk image. Unit is MB.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -18,8 +18,9 @@ in
|
||||||
|
|
||||||
options = {
|
options = {
|
||||||
virtualisation.googleComputeImage.diskSize = mkOption {
|
virtualisation.googleComputeImage.diskSize = mkOption {
|
||||||
type = with types; int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 1536;
|
default = "auto";
|
||||||
|
example = 1536;
|
||||||
description = ''
|
description = ''
|
||||||
Size of disk image. Unit is MB.
|
Size of disk image. Unit is MB.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -9,8 +9,9 @@ in {
|
||||||
options = {
|
options = {
|
||||||
hyperv = {
|
hyperv = {
|
||||||
baseImageSize = mkOption {
|
baseImageSize = mkOption {
|
||||||
type = types.int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 2048;
|
default = "auto";
|
||||||
|
example = 2048;
|
||||||
description = ''
|
description = ''
|
||||||
The size of the hyper-v base image in MiB.
|
The size of the hyper-v base image in MiB.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -11,8 +11,9 @@ in {
|
||||||
options = {
|
options = {
|
||||||
virtualbox = {
|
virtualbox = {
|
||||||
baseImageSize = mkOption {
|
baseImageSize = mkOption {
|
||||||
type = types.int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 50 * 1024;
|
default = "auto";
|
||||||
|
example = 50 * 1024;
|
||||||
description = ''
|
description = ''
|
||||||
The size of the VirtualBox base image in MiB.
|
The size of the VirtualBox base image in MiB.
|
||||||
'';
|
'';
|
||||||
|
|
|
@ -18,8 +18,9 @@ in {
|
||||||
options = {
|
options = {
|
||||||
vmware = {
|
vmware = {
|
||||||
baseImageSize = mkOption {
|
baseImageSize = mkOption {
|
||||||
type = types.int;
|
type = with types; either (enum [ "auto" ]) int;
|
||||||
default = 2048;
|
default = "auto";
|
||||||
|
example = 2048;
|
||||||
description = ''
|
description = ''
|
||||||
The size of the VMWare base image in MiB.
|
The size of the VMWare base image in MiB.
|
||||||
'';
|
'';
|
||||||
|
|
Loading…
Reference in a new issue