promox-image: use virtualisation.diskSize
This commit is contained in:
@@ -6,8 +6,26 @@
|
||||
}:
|
||||
|
||||
with lib;
|
||||
|
||||
let
|
||||
virtualisationOptions = import ./virtualisation-options.nix;
|
||||
in
|
||||
{
|
||||
imports = [
|
||||
virtualisationOptions.diskSize
|
||||
(lib.mkRenamedOptionModuleWith {
|
||||
sinceRelease = 2411;
|
||||
from = [
|
||||
"virtualisation"
|
||||
"proxmoxImage"
|
||||
"diskSize"
|
||||
];
|
||||
to = [
|
||||
"virtualisation"
|
||||
"diskSize"
|
||||
];
|
||||
})
|
||||
];
|
||||
|
||||
options.proxmox = {
|
||||
qemuConf = {
|
||||
# essential configs
|
||||
@@ -95,16 +113,6 @@ with lib;
|
||||
either "efi" or "hybrid".
|
||||
'';
|
||||
};
|
||||
diskSize = mkOption {
|
||||
type = types.str;
|
||||
default = "auto";
|
||||
example = "20480";
|
||||
description = ''
|
||||
The size of the disk, in megabytes.
|
||||
if "auto" size is calculated based on the contents copied to it and
|
||||
additionalSpace is taken into account.
|
||||
'';
|
||||
};
|
||||
net0 = mkOption {
|
||||
type = types.commas;
|
||||
default = "virtio=00:00:00:00:00:00,bridge=vmbr0,firewall=1";
|
||||
@@ -305,7 +313,8 @@ with lib;
|
||||
mkdir -p $out/nix-support
|
||||
echo "file vma $out/vzdump-qemu-${cfg.filenameSuffix}.vma.zst" > $out/nix-support/hydra-build-products
|
||||
'';
|
||||
inherit (cfg.qemuConf) additionalSpace diskSize bootSize;
|
||||
inherit (cfg.qemuConf) additionalSpace bootSize;
|
||||
inherit (config.virtualisation) diskSize;
|
||||
format = "raw";
|
||||
inherit config lib pkgs;
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user