mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-06-12 04:35:41 +03:00
linode-image: use virtualisation.diskSize
This commit is contained in:
parent
564b6ce153
commit
048599f0d7
1 changed files with 18 additions and 10 deletions
|
@ -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;
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue