about summary refs log tree commit diff
path: root/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/nixos/modules/virtualisation/qemu-vm.nix')
-rw-r--r--nixpkgs/nixos/modules/virtualisation/qemu-vm.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix b/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix
index 4592ffcfe4db..be06d6feb11f 100644
--- a/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixpkgs/nixos/modules/virtualisation/qemu-vm.nix
@@ -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 contain 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"
       ])