treewide: use auto diskSize for make-disk-image

This commit is contained in:
lassulus 2020-12-19 19:41:11 +01:00
parent cd0ffd3f5f
commit f3aa040bcb
9 changed files with 22 additions and 16 deletions

View File

@ -10,7 +10,6 @@ with lib;
system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config pkgs;
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''

View File

@ -40,8 +40,9 @@ in {
};
sizeMB = mkOption {
type = types.int;
default = if config.ec2.hvm then 2048 else 8192;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 8192;
description = "The size in MB of the image";
};

View File

@ -12,8 +12,8 @@ with lib;
system.build.openstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config;
additionalSpace = "1024M";
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''

View File

@ -9,8 +9,9 @@ in
options = {
virtualisation.azureImage.diskSize = mkOption {
type = with types; int;
default = 2048;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
description = ''
Size of disk image. Unit is MB.
'';

View File

@ -10,8 +10,9 @@ in
options = {
virtualisation.digitalOceanImage.diskSize = mkOption {
type = with types; int;
default = 4096;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 4096;
description = ''
Size of disk image. Unit is MB.
'';

View File

@ -18,8 +18,9 @@ in
options = {
virtualisation.googleComputeImage.diskSize = mkOption {
type = with types; int;
default = 1536;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 1536;
description = ''
Size of disk image. Unit is MB.
'';

View File

@ -9,8 +9,9 @@ in {
options = {
hyperv = {
baseImageSize = mkOption {
type = types.int;
default = 2048;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
description = ''
The size of the hyper-v base image in MiB.
'';

View File

@ -11,8 +11,9 @@ in {
options = {
virtualbox = {
baseImageSize = mkOption {
type = types.int;
default = 50 * 1024;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 50 * 1024;
description = ''
The size of the VirtualBox base image in MiB.
'';

View File

@ -18,8 +18,9 @@ in {
options = {
vmware = {
baseImageSize = mkOption {
type = types.int;
default = 2048;
type = with types; either (enum [ "auto" ]) int;
default = "auto";
example = 2048;
description = ''
The size of the VMWare base image in MiB.
'';