3 ms·
Interesting! I use Guix, I wonder if the fundamental idea can be translated here too. Do you have any links for the Nix-related stuff?
by alt187 2y ago
Interesting! I use Guix, I wonder if the fundamental idea can be translated here too. Do you have any links for the Nix-related stuff?
- rendaw 2y agoArrg, I just realized I lost my demo system in a recent drive failure. So I don't have anything I can show directly... but this is my recollection. I used systemd-nspawn containers https://nixos.wiki/wiki/NixOS_Containers https://nixos.wiki/wiki/NixOS_Containers . For each container I'd run a `filterway` process with a unique app id outside the container and mount the filterway wayland socket inside the container, then wayland programs in the container would just work IIRC (maybe needed to set an environment variable for the wayland socket, or xdg_runtime_dir or something). I think the wayland compositor itself was running as a user, so I had some setuid commands so that the system bar launch icons could start/stop the containers as the wayland user. IIRC wayland was pretty flexible, just mounting sockets in various places and making sure permissions were set on the socket worked great. Some other quick notes: App ids are optional in the wayland spec, but as long as you don't run any such apps in privileged contexts (outside of a container) you can still visually distinguish those. Also IIRC Sway didn't have the ability to vary chrome based on app id - I thought I'd try to indicate the permission level in the task/system bar instead but I think other compositors do have more powerful window decoration rules.
- alt187 2y agoImpressive! I'm not sure Guix has something similar to nspawn containers Hyprland has a way to put unique borders per appid too, I think.