Unverified Commit 4dbb691a authored by Paul Haerle's avatar Paul Haerle Committed by GitHub
Browse files

vmware: baseImageSize -> virtualisation.diskSize (#381216)

parents 8eb8fdb3 4de5af6f
Loading
Loading
Loading
Loading
+12 −11
Original line number Diff line number Diff line
@@ -23,7 +23,6 @@ in
    (lib.mkRenamedOptionModuleWith {
      sinceRelease = 2505;
      from = [
        "virtualisation"
        "vmware"
        "vmFileName"
      ];
@@ -32,19 +31,21 @@ in
        "fileName"
      ];
    })

    (lib.modules.mkRenamedOptionModuleWith {
      sinceRelease = 2605;
      from = [
        "vmware"
        "baseImageSize"
      ];
      to = [
        "virtualisation"
        "diskSize"
      ];
    })
  ];

  options = {
    vmware = {
      baseImageSize = lib.mkOption {
        type = with lib.types; either (enum [ "auto" ]) int;
        default = "auto";
        example = 2048;
        description = ''
          The size of the VMWare base image in MiB.
        '';
      };
      vmDerivationName = lib.mkOption {
        type = lib.types.str;
        default = "nixos-vmware-${config.system.nixos.label}-${pkgs.stdenv.hostPlatform.system}";
@@ -78,7 +79,7 @@ in
        rm $diskImage
      '';
      format = "raw";
      diskSize = cfg.baseImageSize;
      diskSize = config.virtualisation.diskSize;
      partitionTableType = "efi";
      inherit config lib pkgs;
    };