at master 843 B view raw
1# nix-build '<nixpkgs/nixos>' -A config.system.build.cloudstackImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/cloudstack/cloudstack-image.nix ]; }" 2 3{ 4 config, 5 lib, 6 pkgs, 7 ... 8}: 9 10{ 11 imports = [ 12 13 ../../../modules/virtualisation/cloudstack-config.nix 14 ../../../modules/image/file-options.nix 15 ]; 16 17 system.nixos.tags = [ "cloudstack" ]; 18 image.extension = "qcow2"; 19 system.build.image = config.system.build.cloudstackImage; 20 system.build.cloudstackImage = import ../../../lib/make-disk-image.nix { 21 inherit lib config pkgs; 22 inherit (config.virtualisation) diskSize; 23 baseName = config.image.baseName; 24 format = "qcow2"; 25 configFile = pkgs.writeText "configuration.nix" '' 26 { 27 imports = [ <nixpkgs/nixos/modules/virtualisation/cloudstack-config.nix> ]; 28 } 29 ''; 30 }; 31 32}