options: add imageName option to disk type.

For disk type, option name used in disk partlabel
naming should be short. While setting a specialized
option imageName allow us to create image with long name
without side-effects.
This commit is contained in:
qbisi authored and mergify[bot] committed 2024-10-14 16:16:13 +00:00
1 parent 9938afb435
commit ef408f7f9a
2 files changed
+11 -3

No files matched your search

+8
View File
@@ -16,6 +16,14 @@
type = diskoLib.optionTypes.absolute-pathname; # TODO check if subpath of /dev ? - No! eg: /.swapfile
description = "Device path";
};
imageName = lib.mkOption {
type = lib.types.str;
default = config.name;
description = ''
name of the image when disko images are created
is used as an argument to "qemu-img create ..."
'';
};
imageSize = lib.mkOption {
type = lib.types.strMatching "[0-9]+[KMGTP]?";
description = ''