Here’s a POC Flatpak.
Issues:
-
As expected the creation of the Unix file socket in /tmp means Flatpak needs to mount /tmp from the host.
A Linux named socket would be a better solution as it could be shared across containers as long as they use the same network namespace. -
It seems like ~/.config is hardcoded and Insync does not respect XDG_CONFIG_HOME.
-
At least on my testing system, the tray bar status icon is missing. My current guess is that /usr/share/icons/hicolor/48x48/status is hardcoded. Insync should respect XDG_DATA_DIRS or at least use a relative path to share/icons/hicolor/48x48/status from lib/insync/insync exectuable.