Merge pull request #166578 from Enzime/nix-run-vm

nixos/qemu-vm: Set `mainProgram` for `nix run`
This commit is contained in:
Robert Hensing 2022-03-31 19:00:38 +02:00 committed by GitHub
commit 60554e4686
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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