nixos/qemu-vm: Set mainProgram for nix run

This commit is contained in:
Michael Hoang 2022-04-01 01:34:26 +11:00
parent 9a20d75689
commit 2c102d19c0

View file

@ -961,7 +961,10 @@ in
services.qemuGuest.enable = cfg.qemu.guestAgent.enable;
system.build.vm = pkgs.runCommand "nixos-vm" { preferLocalBuild = true; }
system.build.vm = pkgs.runCommand "nixos-vm" {
preferLocalBuild = true;
meta.mainProgram = "run-${config.system.name}-vm";
}
''
mkdir -p $out/bin
ln -s ${config.system.build.toplevel} $out/system