mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-11 07:23:40 +00:00
virtualisation/azure-image: use system.build.image
This commit is contained in:
parent
77fce1dc58
commit
f3563c996e
@ -13,6 +13,7 @@ in
|
|||||||
imports = [
|
imports = [
|
||||||
./azure-common.nix
|
./azure-common.nix
|
||||||
./disk-size-option.nix
|
./disk-size-option.nix
|
||||||
|
../image/file-options.nix
|
||||||
(lib.mkRenamedOptionModuleWith {
|
(lib.mkRenamedOptionModuleWith {
|
||||||
sinceRelease = 2411;
|
sinceRelease = 2411;
|
||||||
from = [
|
from = [
|
||||||
@ -61,10 +62,14 @@ in
|
|||||||
};
|
};
|
||||||
|
|
||||||
config = {
|
config = {
|
||||||
|
image.extension = "vhd";
|
||||||
|
system.nixos.tags = [ "azure" ];
|
||||||
|
system.build.image = config.system.build.azureImage;
|
||||||
system.build.azureImage = import ../../lib/make-disk-image.nix {
|
system.build.azureImage = import ../../lib/make-disk-image.nix {
|
||||||
name = "azure-image";
|
name = "azure-image";
|
||||||
|
inherit (config.image) baseName;
|
||||||
postVM = ''
|
postVM = ''
|
||||||
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -o subformat=fixed,force_size -O vpc $diskImage $out/disk.vhd
|
${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -o subformat=fixed,force_size -O vpc $diskImage $out/${config.image.fileName}
|
||||||
rm $diskImage
|
rm $diskImage
|
||||||
'';
|
'';
|
||||||
configFile = ./azure-config-user.nix;
|
configFile = ./azure-config-user.nix;
|
||||||
|
Loading…
Reference in New Issue
Block a user