diff --git a/nixos/modules/virtualisation/linode-image.nix b/nixos/modules/virtualisation/linode-image.nix index 48d7f98e6abe..4725f0a2f9b7 100644 --- a/nixos/modules/virtualisation/linode-image.nix +++ b/nixos/modules/virtualisation/linode-image.nix @@ -15,19 +15,27 @@ let ]; } ''; + virtualisationOptions = import ./virtualisation-options.nix; in { - imports = [ ./linode-config.nix ]; + imports = [ + ./linode-config.nix + virtualisationOptions.diskSize + (lib.mkRenamedOptionModuleWith { + sinceRelease = 2411; + from = [ + "virtualisation" + "linodeImage" + "diskSize" + ]; + to = [ + "virtualisation" + "diskSize" + ]; + }) + ]; options = { - virtualisation.linodeImage.diskSize = mkOption { - type = with types; either (enum (singleton "auto")) ints.positive; - default = "auto"; - example = 1536; - description = '' - Size of disk image in MB. - ''; - }; virtualisation.linodeImage.configFile = mkOption { type = with types; nullOr str; @@ -62,7 +70,7 @@ in format = "raw"; partitionTableType = "none"; configFile = if cfg.configFile == null then defaultConfigFile else cfg.configFile; - inherit (cfg) diskSize; + inherit (config.virtualisation) diskSize; inherit config lib pkgs; }; };