mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-22 18:24:59 +03:00
Merge pull request #26 from thpham/cloudstack
add cloudstack image generator
This commit is contained in:
commit
e006f95894
@ -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
20
formats/cloudstack.nix
Normal 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";
|
||||
}
|
Loading…
Reference in New Issue
Block a user