mirror of
https://github.com/ryan4yin/nix-config.git
synced 2026-03-17 23:03:44 +01:00
feat: idols-akane - add virtfs file sharing between host & guest
This commit is contained in:
@@ -27,6 +27,9 @@ in
|
||||
"fat"
|
||||
"vfat"
|
||||
"exfat"
|
||||
|
||||
# for file sharing between host & guests
|
||||
"virtiofs"
|
||||
];
|
||||
|
||||
boot.initrd.availableKernelModules = [
|
||||
|
||||
18
hosts/idols-akane/virtfs.nix
Normal file
18
hosts/idols-akane/virtfs.nix
Normal file
@@ -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