blob: 4b966bd431eff7abbc5a5be971abf217ddc5e75f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
|
# nix-build '<nixpkgs/nixos>' -A config.system.build.cloudstackImage --arg configuration "{ imports = [ ./nixos/maintainers/scripts/cloudstack/cloudstack-image.nix ]; }"
{
config,
lib,
pkgs,
...
}:
{
imports = [
../../../modules/virtualisation/cloudstack-config.nix
../../../modules/image/file-options.nix
];
system.nixos.tags = [ "cloudstack" ];
image.extension = "qcow2";
system.build.image = config.system.build.cloudstackImage;
system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
inherit lib config pkgs;
inherit (config.virtualisation) diskSize;
baseName = config.image.baseName;
format = "qcow2";
configFile = pkgs.writeText "configuration.nix" ''
{
imports = [ <nixpkgs/nixos/modules/virtualisation/cloudstack-config.nix> ];
}
'';
};
}
|