I’m currently using EndeavourOS and am trying Nix & NixOS (still not ready to install NixOS on real hardware).
Recently, I tried to install swayfx with nix-env -iA nixpkgs.swayfx. After logging out and entering LightDM, I checked the WM list only to find out that swayfx was not in that list. Is there a way to help LightDM detect swayfx?
That’s expected because packages in nixpkgs do not install any sort of configuration that you would expect to be part of say, pacman packages. You therefore must set this up via some other mechanism, e.g. NixOS, system-manager, home-manager, or even manually (but not feasible to do so manually since you need to point at a store path, so every time the store path changes, your config becomes invalid…) Since you want to stay on the foreign distro:
Use environment.etc to write the other necessary config files to /etc.
The last step’s “necessary” config files will include some session desktop file (so your DM will see it) and possibly some global config so that appropriate envvars are visible in the user systemd session. Steal from the NixOS module for inspiration:
…and for the record, I should note, this would be much easier on NixOS, because the NixOS module takes care of all that for you (and on NixOS you would not use environment.systemPackages for this, since modules that need that already use that too):