I would like to run several GUI apps inside a variety (openSUSE and Ubuntu) of LXC containers.
I googled this and tried following several non-nixos specific guides without success. Is anyone aware of nixos based guides on how to do this, or able to share how this is done?
I think the most important bit is to make X11 and/or Wayland sockets of the host available in the container. That is mounting the actual socket in the container filesystem and setting the ENV variable in the container accordingly.
I want to access certain applications that aren’t officially supported on nixos to support development activities.
I have tried setting up the applications on nixos and been unsuccessful resolving the issues that arose.
As an example, TWS from IBKR doesn’t install and run. It complains about the architecture when trying to install the Java that is bundled with the install and doesn’t work if I install Java myself on nixos.
Also, I would prefer to run the self updating version of the application if possible which defeats the declarative benefits of nixos. As such, it seems that if I can host the app in a container that matches the Linux flavour preferred by the app, then I may be able to derive all the benefits of nixos on the host while still be able to access a collection of applications staged in Linux environments that more closely match production.
Other than that, it seems like it would be a neat thing to do
I usually put podman and and distrobox to work for that use case, not only on NixOS, but also e.g. to run yocto builds in a LTS-Ubuntu while being on the latest Ubuntu (with podman/distrobox provided by a Nix-devshell).
Yes with varying degrees of success. I was able to get a java based trading solution to work fine but unable to get a javascript solution working. I’ll review what I did for the java solution and post it if you are interested.
run several GUI apps inside a variety (openSUSE and Ubuntu) of LXC containers
Unless this refers to “running a limited set of GUI apps”?
Possibly “kiosk-mode” like, along with remote desktop?
I believe there are existing solutions that only need to be translated into “nix”
This issue occured over a year ago and I was able to configure the LXC container to use the hosts X environment resulting in excellent performance for two of the applications.
Subsequently, I had the thought of trying to use buildFHSUserEnv to see if I could get the applications to run natively. I haven’t had a chance to try that but it’s on my list