Merge pull request #26 from thpham/cloudstack

add cloudstack image generator
This commit is contained in:
zimbatm 2019-04-26 12:39:27 +02:00 committed by GitHub
commit e006f95894
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 21 additions and 0 deletions

View File

@ -37,6 +37,7 @@ iso | ISO
kexec | kexec tarball (extract to / and run /kexec_nixos)
kexec-bundle | same as before, but it's just an executable
openstack | qcow2 image for openstack
cloudstack | qcow2 image for cloudstack
qcow2 | qcow2 image
raw | raw image
virtualbox | virtualbox VM

20
formats/cloudstack.nix Normal file
View File

@ -0,0 +1,20 @@
{ config, lib, pkgs, modulesPath, ... }:
{
imports = [
"${toString modulesPath}/virtualisation/cloudstack-config.nix"
];
system.build.cloudstackImage = import "${toString modulesPath}/../lib/make-disk-image.nix" {
inherit lib config pkgs;
diskSize = 8192;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix"
''
{
imports = [ <nixpkgs/nixos/modules/virtualisation/cloudstack-config.nix> ];
}
'';
};
formatAttr = "cloudstackImage";
}