diff options
author | Antoine Eiche <lewo@abesis.fr> | 2017-02-24 22:17:52 +0100 |
---|---|---|
committer | Antoine Eiche <lewo@abesis.fr> | 2017-02-24 22:17:52 +0100 |
commit | dec7ecbbbcc5f68ab8c96d39ba3c62eaf0326242 (patch) | |
tree | ffdb87e39e2bc52d613f77a6349a22bcefc9d6b6 /nixos/maintainers | |
parent | 1c555e772e3ce080184225d1074e9eb0cc99f94d (diff) |
nova-image: refactoring
The nova image configuration is separated from the image build.
Diffstat (limited to 'nixos/maintainers')
-rw-r--r-- | nixos/maintainers/scripts/openstack/nova-image.nix | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/nixos/maintainers/scripts/openstack/nova-image.nix b/nixos/maintainers/scripts/openstack/nova-image.nix new file mode 100644 index 0000000000000..fa9cfb74bd6cc --- /dev/null +++ b/nixos/maintainers/scripts/openstack/nova-image.nix @@ -0,0 +1,24 @@ +{ config, lib, pkgs, ... }: + +with lib; + +{ + imports = + [ ../../../modules/installer/cd-dvd/channel.nix + ../../../modules/virtualisation/nova-config.nix + ]; + + system.build.novaImage = import ../../../lib/make-disk-image.nix { + inherit lib config; + pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package + diskSize = 8192; + format = "qcow2"; + configFile = pkgs.writeText "configuration.nix" + '' + { + imports = [ <nixpkgs/nixos/modules/virtualisation/nova-config.nix> ]; + } + ''; + }; + +} |