Possibility to install Plasma as flatpak

Is there principal a possibility of installing Plasma as flatpak?

I know this would need some work on SDDM to recognize sessions in /var/flatpak/exports, but I could think that there were some benefits:

  • It was much easier to install and test a development version
  • User of LTS distributions could use the latest version of Plasma
  • If the setting are saved within the sandbox, there wouldn’t be any issues with other installed desktop environments.

Is that technically possible? Or does flatpak not allow to run a wayland compositor. I’ve tried installing COSMIC using distrobox and it works, so why should Plasma not work as a flatpak?

Flatpaks for one take up much more space, then you have the fact that it’s bad enough you have meta packages that some distros use so one can just remove some applications cause they are integrated in the meta package. Flatpak most likely would be handled the same way. Take in my case I don’t use Ktorrent, Kget, and a couple of others. I have seen distros where if you want to remove say Kget you’ll break the desktop.

I don’t think the flatpak should contain any apps. In only thought about KWin, plasmashell and Systemsettings (the basic desktop). All the other stuff should be installed separately.
Like I said, the flatpak should mainly provide the possibility of testing a development version of Plasma. So there wouldn’t be the need of included applications, since they were already installed. If someone wants to test them too, there are already nigthly-flatpaks of the most apps.
So basically, the flatpak would replace a vm and use much less disk-space at the end. And if someone prefers the flatpak over a native installation, there would be the possibility.