nixos/qemu-vm: Ensure 9pnet_virtio module is loaded for shared dirs
When `diskImage = null`, the root fs is a tmpfs instead of `/dev/vda`. Thus, it doesn't have to wait for virtio modules to load before being mounted. The root fs is a dependency of shared directories by nature of being their parent directory. Without depending on `/dev/vda`, these shared directories may attempt to mount without virtio modules being loaded.
This commit is contained in:
parent
f0d7076c6a
commit
4e54d10912
@ -1169,7 +1169,7 @@ in
|
||||
value.fsType = "9p";
|
||||
value.neededForBoot = true;
|
||||
value.options =
|
||||
[ "trans=virtio" "version=9p2000.L" "msize=${toString cfg.msize}" ]
|
||||
[ "trans=virtio" "version=9p2000.L" "msize=${toString cfg.msize}" "x-systemd.requires=modprobe@9pnet_virtio.service" ]
|
||||
++ lib.optional (tag == "nix-store") "cache=loose";
|
||||
};
|
||||
in lib.mkMerge [
|
||||
|
Loading…
Reference in New Issue
Block a user