mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-07-10 14:42:40 +02:00
feat: idols-akane - add virtfs file sharing between host & guest
This commit is contained in:
@@ -27,6 +27,9 @@ in
|
|||||||
"fat"
|
"fat"
|
||||||
"vfat"
|
"vfat"
|
||||||
"exfat"
|
"exfat"
|
||||||
|
|
||||||
|
# for file sharing between host & guests
|
||||||
|
"virtiofs"
|
||||||
];
|
];
|
||||||
|
|
||||||
boot.initrd.availableKernelModules = [
|
boot.initrd.availableKernelModules = [
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
{
|
||||||
|
fileSystems."/mnt/utm" = {
|
||||||
|
device = "share"; # 9p tag name from UTM/QEMU configuration
|
||||||
|
fsType = "9p"; # Virtio-9p filesystem type
|
||||||
|
options = [
|
||||||
|
"trans=virtio" # Use virtio transport for paravirtualized I/O
|
||||||
|
"version=9p2000.L" # 9P protocol version (best Linux compatibility)
|
||||||
|
"ro" # Read-only access
|
||||||
|
"_netdev" # Mark as network-dependent (waits for network)
|
||||||
|
"nofail" # Don't fail boot if mount fails
|
||||||
|
"auto" # Mount automatically with -a
|
||||||
|
|
||||||
|
# Ownership mapping - all files appear as specified user/group
|
||||||
|
"uid=1000" # Map to user ID 1000
|
||||||
|
"gid=1000" # Map to group ID 100
|
||||||
|
];
|
||||||
|
};
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user