nixos/qemu-vm: add option to specify security model to use for a shared directory
This commit is contained in:
parent
c65ffe3f17
commit
777f5b67c2
@ -250,7 +250,7 @@ let
|
||||
${concatStringsSep " " config.virtualisation.qemu.networkingOptions} \
|
||||
${concatStringsSep " \\\n "
|
||||
(mapAttrsToList
|
||||
(tag: share: "-virtfs local,path=${share.source},security_model=none,mount_tag=${tag}")
|
||||
(tag: share: "-virtfs local,path=${share.source},security_model=${share.securityModel},mount_tag=${tag}")
|
||||
config.virtualisation.sharedDirectories)} \
|
||||
${drivesCmdLine config.virtualisation.qemu.drives} \
|
||||
${concatStringsSep " \\\n " config.virtualisation.qemu.options} \
|
||||
@ -474,6 +474,11 @@ in
|
||||
type = types.path;
|
||||
description = lib.mdDoc "The mount point of the directory inside the virtual machine";
|
||||
};
|
||||
options.securityModel = mkOption {
|
||||
type = types.enum [ "passthrough" "mapped" "mapped-xattr" "mapped-file" "none" ];
|
||||
default = "none";
|
||||
description = lib.mdDoc "The security model to use for this share";
|
||||
};
|
||||
});
|
||||
default = { };
|
||||
example = {
|
||||
|
Loading…
Reference in New Issue
Block a user