types disk: add imageSize for makeDiskImage

This commit is contained in:
lassulus authored and mergify[bot] committed 2023-07-28 12:43:42 +00:00
1 parent a8834f94f3
commit 578ad4ef34
2 files changed
+9 -1

No files matched your search

+1 -1
View File
@@ -22,7 +22,7 @@ pkgs.vmTools.runInLinuxVM (pkgs.runCommand name {
];
preVM = ''
# TODO: get size either dynamically or from disko config
${lib.concatMapStringsSep "\n" (disk: "truncate -s 15G ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}
${lib.concatMapStringsSep "\n" (disk: "truncate -s ${disk.imageSize} ${disk.name}.raw") (lib.attrValues nixosConfig.config.disko.devices.disk)}
'';
postVM = ''
mkdir -p $out