make-disk-image: Allow passing of image baseName (#359326)

This commit is contained in:
Jörg Thalheim 2024-11-26 21:28:32 +01:00 committed by GitHub
commit 41961a54e1
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -163,6 +163,9 @@ To solve this, you can run `fdisk -l $image` and generate `dd if=$image of=$imag
, # Disk image format, one of qcow2, qcow2-compressed, vdi, vpc, raw.
format ? "raw"
, # Disk image filename, without any extensions (e.g. `image_1`).
baseName ? "nixos"
# Whether to fix:
# - GPT Disk Unique Identifier (diskGUID)
# - GPT Partition Unique Identifier: depends on the layout, root partition UUID can be controlled through `rootGPUID` option
@ -208,7 +211,7 @@ let format' = format; in let
compress = lib.optionalString (format' == "qcow2-compressed") "-c";
filename = "nixos." + {
filename = "${baseName}." + {
qcow2 = "qcow2";
vdi = "vdi";
vpc = "vhd";