From 5c8b2165a3e2c49aadd5d786d0c91596a436650c Mon Sep 17 00:00:00 2001 From: Thomas Kim Pham Date: Fri, 26 Apr 2019 09:11:13 +0200 Subject: [PATCH 1/2] add cloudstack image generator --- formats/cloudstack.nix | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 formats/cloudstack.nix diff --git a/formats/cloudstack.nix b/formats/cloudstack.nix new file mode 100644 index 0000000..f4943c6 --- /dev/null +++ b/formats/cloudstack.nix @@ -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 = [ ]; + } + ''; + }; + + formatAttr = "cloudstackImage"; +} From 4055785d4ad51171a051f4a30e469e00a5a3eb2b Mon Sep 17 00:00:00 2001 From: Thomas Kim Pham Date: Fri, 26 Apr 2019 09:27:07 +0200 Subject: [PATCH 2/2] cloudstack image documentation --- README.md | 1 + 1 file changed, 1 insertion(+) diff --git a/README.md b/README.md index ae38eac..7ac3a68 100644 --- a/README.md +++ b/README.md @@ -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