summary refs log tree commit diff
path: root/nixos/modules/virtualisation
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2020-06-08 10:46:11 +0200
committerGitHub <noreply@github.com>2020-06-08 10:46:11 +0200
commit3590f02e7d5760e52072c1a729ee2250b5560746 (patch)
tree19730222e1ab069eaca99f1723c4564731d762f1 /nixos/modules/virtualisation
parent657f4927ebcde600377a8ef3d7722bc701548e32 (diff)
parent55912f3535217910b12e81f07fb10d70511a471b (diff)
downloadnixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar.gz
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar.bz2
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar.lz
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar.xz
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.tar.zst
nixpkgs-3590f02e7d5760e52072c1a729ee2250b5560746.zip
Merge pull request #88574 from JJJollyjim/qemu-vm-qboot-opt
nixos/qemu-vm: add option to use qboot
Diffstat (limited to 'nixos/modules/virtualisation')
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix15
1 files changed, 15 insertions, 0 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index 4592ffcfe4d..b8d0606be7c 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/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 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"
       ])