1# nix-build '<nixpkgs/nixos>' -A config.system.build.openstackImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/openstack-image.nix ]; }"
2
3{ config, lib, pkgs, ... }:
4let
5 copyChannel = true;
6in
7{
8 imports = [
9 ../../../modules/virtualisation/openstack-config.nix
10 ] ++ (lib.optional copyChannel ../../../modules/installer/cd-dvd/channel.nix);
11
12 documentation.enable = copyChannel;
13
14 system.build.openstackImage = import ../../../lib/make-disk-image.nix {
15 inherit lib config copyChannel;
16 additionalSpace = "1024M";
17 pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
18 format = "qcow2";
19 configFile = pkgs.writeText "configuration.nix"
20 ''
21 {
22 imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ];
23 }
24 '';
25 };
26
27}