Update XDG handlers to use GIVC instead of SSH #941
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
This updates XDG handlers to use GIVC and virtiofs storage instead of SSH and SCP.
For file sharing, this approach uses a shared XDG folder with the following structure:
/shared/xdg/mime/appvm
. Within the XDG folder there is a separate folder for each MIME type. These folders are passed to the VMs that can handle those types as virtiofs devices. Currently,zathura-vm
is used for handling both PDFs and images. Inside each MIME type folder there are subfolders for each appvm. These subfolders are passed to their respective appvms. This way appvms can share files withzathura-vm
by simply copying them into they folder.For example,
chrome-vm
has the/share/xdg/pdf/chrome-vm
folder mounted as/run/xdg/pdf
in the guest, but it can’t access the entire mime folder or other appvms files because only/share/xdg/pdf/chrome-vm
is passed as virtiofs device. However,zathura-vm
has access to the entire MIME folder, which includes subfolders for all appvms.This is just one possible implementation. The advantage of this approach is that it doesn’t require redesigning the Ghaf file storage system. Files are shared through simple copying with no network data transfers and appvms cannot access files from other appvms since they are isolated at the virtiofs device level.
Checklist for things done
x86_64
aarch64
riscv64
make-checks
and it passesnixos-rebuild ... switch
Instructions for Testing