diff --git a/nixos/lib/make-disk-image.nix b/nixos/lib/make-disk-image.nix index 6fec322f909..5e86ea479d5 100644 --- a/nixos/lib/make-disk-image.nix +++ b/nixos/lib/make-disk-image.nix @@ -27,6 +27,9 @@ , # The root file system type. fsType ? "ext4" +, # Filesystem label + label ? "nixos" + , # The initial NixOS configuration file to be copied to # /etc/nixos/configuration.nix. configFile ? null @@ -134,9 +137,9 @@ let format' = format; in let # Get start & length of the root partition in sectors to $START and $SECTORS. eval $(partx $diskImage -o START,SECTORS --nr ${rootPartition} --pairs) - mkfs.${fsType} -F -L nixos $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K + mkfs.${fsType} -F -L ${label} $diskImage -E offset=$(sectorsToBytes $START) $(sectorsToKilobytes $SECTORS)K '' else '' - mkfs.${fsType} -F -L nixos $diskImage + mkfs.${fsType} -F -L ${label} $diskImage ''} root="$PWD/root"