From 7f862474b4a5818845bb76d08b8a89d40317afe6 Mon Sep 17 00:00:00 2001 From: Manuel Thalmann Date: Wed, 1 May 2024 04:14:37 +0200 Subject: [PATCH] Clean up the vm script creation --- lib/config/custom-build-vm.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/config/custom-build-vm.nix b/lib/config/custom-build-vm.nix index ba9d6fd..7986e75 100644 --- a/lib/config/custom-build-vm.nix +++ b/lib/config/custom-build-vm.nix @@ -122,6 +122,8 @@ in { vm else let + command = "${vm}/bin/run-${config.system.name}-vm"; + prefix = lib.concatStringsSep " " ( lib.optionals config.virtualisation.runAsRoot ( @@ -138,7 +140,7 @@ in { name = "run-${config.system.name}-vm"; text = lib.strings.concatLines ( [ - "${prefix} ${vm}/bin/run-${config.system.name}-vm ${suffix}" + "${prefix} ${command} ${suffix}" ] ++ ( let spice = config.virtualisation.qemu.spice;