Merge pull request #88574 from JJJollyjim/qemu-vm-qboot-opt

nixos/qemu-vm: add option to use qboot
This commit is contained in:
Florian Klink
2020-06-08 10:46:11 +02:00
committed by GitHub
4 changed files with 32 additions and 1 deletions
+15
View File
@@ -441,6 +441,18 @@ in
'';
};
virtualisation.bios =
mkOption {
default = null;
type = types.nullOr types.package;
description =
''
An alternate BIOS (such as <package>qboot</package>) with which to start the VM.
Should containin a file named <literal>bios.bin</literal>.
If <literal>null</literal>, QEMU's builtin SeaBIOS will be used.
'';
};
};
config = {
@@ -521,6 +533,9 @@ in
(mkIf cfg.useEFIBoot [
"-pflash $TMPDIR/bios.bin"
])
(mkIf (cfg.bios != null) [
"-bios ${cfg.bios}/bios.bin"
])
(mkIf (!cfg.graphics) [
"-nographic"
])