2019-01-28 15:09:48 +01:00
|
|
|
# nix-build '<nixpkgs/nixos>' -A config.system.build.openstackImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/openstack/openstack-image.nix ]; }"
|
|
|
|
|
|
|
|
{
|
|
|
|
config,
|
|
|
|
lib,
|
|
|
|
pkgs,
|
|
|
|
...
|
|
|
|
}:
|
2022-02-03 09:57:01 -05:00
|
|
|
let
|
|
|
|
copyChannel = true;
|
2024-11-15 12:16:10 +01:00
|
|
|
format = "qcow2";
|
2022-02-03 09:57:01 -05:00
|
|
|
in
|
2019-01-28 15:09:48 +01:00
|
|
|
{
|
2022-02-03 09:56:55 -05:00
|
|
|
imports = [
|
|
|
|
../../../modules/virtualisation/openstack-config.nix
|
2024-11-15 12:16:10 +01:00
|
|
|
../../../modules/image/file-options.nix
|
2022-02-03 09:57:01 -05:00
|
|
|
] ++ (lib.optional copyChannel ../../../modules/installer/cd-dvd/channel.nix);
|
|
|
|
|
|
|
|
documentation.enable = copyChannel;
|
2019-01-28 15:09:48 +01:00
|
|
|
|
2024-11-15 12:16:10 +01:00
|
|
|
image.extension = format;
|
|
|
|
system.nixos.tags = [ "openstack" ];
|
|
|
|
system.build.image = config.system.build.openstackImage;
|
2019-01-28 15:09:48 +01:00
|
|
|
system.build.openstackImage = import ../../../lib/make-disk-image.nix {
|
2024-11-15 12:16:10 +01:00
|
|
|
inherit
|
|
|
|
lib
|
|
|
|
config
|
|
|
|
copyChannel
|
|
|
|
format
|
|
|
|
;
|
|
|
|
inherit (config.image) baseName;
|
2020-12-19 19:41:11 +01:00
|
|
|
additionalSpace = "1024M";
|
2019-01-28 15:09:48 +01:00
|
|
|
pkgs = import ../../../.. { inherit (pkgs) system; }; # ensure we use the regular qemu-kvm package
|
|
|
|
configFile = pkgs.writeText "configuration.nix" ''
|
|
|
|
{
|
|
|
|
imports = [ <nixpkgs/nixos/modules/virtualisation/openstack-config.nix> ];
|
|
|
|
}
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
|
|
|
|
}
|