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
|
# the VM in the host. On the other hand, the root filesystem is a
|
||||||
# read/writable disk image persistent across VM reboots.
|
# read/writable disk image persistent across VM reboots.
|
||||||
|
|
||||||
{ config, lib, pkgs, ... }:
|
{ config, lib, pkgs, options, ... }:
|
||||||
|
|
||||||
with lib;
|
with lib;
|
||||||
with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
with import ../../lib/qemu-flags.nix { inherit pkgs; };
|
||||||
@ -266,6 +266,8 @@ in
|
|||||||
|
|
||||||
options = {
|
options = {
|
||||||
|
|
||||||
|
virtualisation.fileSystems = options.fileSystems;
|
||||||
|
|
||||||
virtualisation.memorySize =
|
virtualisation.memorySize =
|
||||||
mkOption {
|
mkOption {
|
||||||
default = 384;
|
default = 384;
|
||||||
@ -659,6 +661,7 @@ in
|
|||||||
# attribute should be disregarded for the purpose of building a VM
|
# attribute should be disregarded for the purpose of building a VM
|
||||||
# test image (since those filesystems don't exist in the VM).
|
# test image (since those filesystems don't exist in the VM).
|
||||||
fileSystems = mkVMOverride (
|
fileSystems = mkVMOverride (
|
||||||
|
cfg.fileSystems //
|
||||||
{ "/".device = cfg.bootDevice;
|
{ "/".device = cfg.bootDevice;
|
||||||
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
|
${if cfg.writableStore then "/nix/.ro-store" else "/nix/store"} =
|
||||||
{ device = "store";
|
{ device = "store";
|
||||||
|
Loading…
x
Reference in New Issue
Block a user