summary refs log tree commit diff
diff options
context:
space:
mode:
authorMaciej Krüger <mkg20001@gmail.com>2021-02-11 11:02:45 +0100
committerMaciej Krüger <mkg20001@gmail.com>2021-02-11 11:02:45 +0100
commit45b8e831287dcd40dff15b9da93bf8626d32d994 (patch)
treee1628dc21801489b0366ccd742eb000e09d4eed4
parent56565e3568b9897b8e282e66f743c1189198b24b (diff)
downloadnixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar.gz
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar.bz2
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar.lz
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar.xz
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.tar.zst
nixpkgs-45b8e831287dcd40dff15b9da93bf8626d32d994.zip
qemu-vm: add virtualisation.fileSystems to allow extra vm mounts
-rw-r--r--nixos/modules/virtualisation/qemu-vm.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/virtualisation/qemu-vm.nix b/nixos/modules/virtualisation/qemu-vm.nix
index bf3615f2fe7..5360cff22f3 100644
--- a/nixos/modules/virtualisation/qemu-vm.nix
+++ b/nixos/modules/virtualisation/qemu-vm.nix
@@ -7,7 +7,7 @@
 # the VM in the host.  On the other hand, the root filesystem is a
 # read/writable disk image persistent across VM reboots.
 
-{ config, lib, pkgs, ... }:
+{ config, lib, pkgs, options, ... }:
 
 with lib;
 with import ../../lib/qemu-flags.nix { inherit pkgs; };
@@ -266,6 +266,8 @@ in
 
   options = {
 
+    virtualisation.fileSystems = options.fileSystems;
+
     virtualisation.memorySize =
       mkOption {
         default = 384;
@@ -659,6 +661,7 @@ in
     # attribute should be disregarded for the purpose of building a VM
     # test image (since those filesystems don't exist in the VM).
     fileSystems = mkVMOverride (
+      cfg.fileSystems //
       { "/".device = cfg.bootDevice;
         ${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
           { device = "store";