mirror of
https://github.com/nix-community/nixos-generators.git
synced 2024-11-23 02:45:29 +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 | kexec tarball (extract to / and run /kexec_nixos)
|
||||||
kexec-bundle | same as before, but it's just an executable
|
kexec-bundle | same as before, but it's just an executable
|
||||||
openstack | qcow2 image for openstack
|
openstack | qcow2 image for openstack
|
||||||
|
cloudstack | qcow2 image for cloudstack
|
||||||
qcow2 | qcow2 image
|
qcow2 | qcow2 image
|
||||||
raw | raw image
|
raw | raw image
|
||||||
virtualbox | virtualbox VM
|
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