1 { config, lib, pkgs, ... }:
5 cfg = config.virtualisation.azureImage;
8 imports = [ ./azure-common.nix ];
11 virtualisation.azureImage.diskSize = mkOption {
12 type = with types; either (enum [ "auto" ]) int;
15 description = lib.mdDoc ''
16 Size of disk image. Unit is MB.
19 virtualisation.azureImage.contents = mkOption {
20 type = with types; listOf attrs;
22 description = lib.mdDoc ''
23 Extra contents to add to the image.
28 system.build.azureImage = import ../../lib/make-disk-image.nix {
31 ${pkgs.vmTools.qemu}/bin/qemu-img convert -f raw -o subformat=fixed,force_size -O vpc $diskImage $out/disk.vhd
34 configFile = ./azure-config-user.nix;
36 inherit (cfg) diskSize contents;
37 inherit config lib pkgs;