qemu-vm: add virtualisation.fileSystems to allow extra vm mounts
This commit is contained in:
parent
56565e3568
commit
45b8e83128
|
@ -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";
|
||||
|
|
Loading…
Reference in a new issue