Merge pull request #88574 from JJJollyjim/qemu-vm-qboot-opt
nixos/qemu-vm: add option to use qboot
This commit is contained in:
@@ -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"
|
||||
])
|
||||
|
||||
Reference in New Issue
Block a user