Merge pull request #165583 from bosu/patch-1
nixos/qemu-vm: allow booting VM with the custom kernel
commitdd0d10bbb606c0daff517ba138d47352513f2d42
authorRobert Hensing <roberth@users.noreply.github.com>
dateMon 4 Apr 2022, 14:33 (5 years ago)
parent08660ae6af3e61
nixos/modules/virtualisation/qemu-vm.nix+1−1
@@ -854,7 +854,7 @@ in
854854 "-device virtio-gpu-pci" "-device usb-ehci,id=usb0" "-device usb-kbd" "-device usb-tablet"
855855 ])
856856 (mkIf (!cfg.useBootLoader) [
857− "-kernel ${config.system.build.toplevel}/kernel"
857+ "-kernel \${NIXPKGS_QEMU_KERNEL_${config.system.name}:-${config.system.build.toplevel}/kernel}"
858858 "-initrd ${config.system.build.toplevel}/initrd"
859859 ''-append "$(cat ${config.system.build.toplevel}/kernel-params) init=${config.system.build.toplevel}/init regInfo=${regInfo}/registration ${consoles} $QEMU_KERNEL_PARAMS"''
860860 ])