From 3de11ae4d9dc3b06fecb16301238667abb073e85 Mon Sep 17 00:00:00 2001 From: Git Sagar Date: Fri, 9 Aug 2024 19:52:36 -0300 Subject: [PATCH] debug flag for image building --- lib/images/commons/customizeImage.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/images/commons/customizeImage.nix b/lib/images/commons/customizeImage.nix index 1d9309b..de22cbd 100644 --- a/lib/images/commons/customizeImage.nix +++ b/lib/images/commons/customizeImage.nix @@ -10,7 +10,8 @@ install ? [], run ? "", commands ? "", - osType ? "linux" + osType ? "linux", + debug ? false }: let originalImageName = lib.strings.removeSuffix "-vmix" (lib.strings.removeSuffix ".qcow2" originalImage.name); @@ -41,6 +42,7 @@ #export LIBGUESTFS_HV="${qemuWrapperScript}" ${pkgs.guestfs-tools}/bin/virt-customize \ + ${lib.optionalString debug "-v"} \ -a ${resultImg} \ --smp ${builtins.toString smp} \ --memsize ${builtins.toString memSize} \ @@ -52,4 +54,4 @@ mv ${resultImg} $out ''; in - pkgs.runCommand customImageName { __noChroot = true; } builderCommand \ No newline at end of file + pkgs.runCommand customImageName { __noChroot = true; } builderCommand