Skip to content

Commit e6d927f

Browse files
authored
cloudstack: add to image/images (#398556)
2 parents 326702f + d7e76ed commit e6d927f

File tree

3 files changed

+13
-2
lines changed

3 files changed

+13
-2
lines changed

nixos/maintainers/scripts/cloudstack/cloudstack-image.nix

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,19 @@
88
}:
99

1010
{
11-
imports = [ ../../../modules/virtualisation/cloudstack-config.nix ];
11+
imports = [
1212

13+
../../../modules/virtualisation/cloudstack-config.nix
14+
../../../modules/image/file-options.nix
15+
];
16+
17+
system.nixos.tags = [ "cloudstack" ];
18+
image.extension = "qcow2";
19+
system.build.image = config.system.build.cloudstackImage;
1320
system.build.cloudstackImage = import ../../../lib/make-disk-image.nix {
1421
inherit lib config pkgs;
22+
inherit (config.virtualisation) diskSize;
23+
baseName = config.image.baseName;
1524
format = "qcow2";
1625
configFile = pkgs.writeText "configuration.nix" ''
1726
{

nixos/modules/image/images.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ let
1111
imageModules = {
1212
amazon = ../../maintainers/scripts/ec2/amazon-image.nix;
1313
azure = ../virtualisation/azure-image.nix;
14+
cloudstack = ../../maintainers/scripts/cloudstack/cloudstack-image.nix;
1415
digital-ocean = ../virtualisation/digital-ocean-image.nix;
1516
google-compute = ../virtualisation/google-compute-image.nix;
1617
hyperv = ../virtualisation/hyperv-image.nix;

nixos/modules/virtualisation/cloudstack-config.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,10 @@ with lib;
88
];
99

1010
config = {
11-
fileSystems."/" = {
11+
fileSystems."/" = lib.mkImageMediaOverride {
1212
device = "/dev/disk/by-label/nixos";
1313
autoResize = true;
14+
fsType = "ext4";
1415
};
1516

1617
boot.growPartition = true;

0 commit comments

Comments
 (0)