swayfx: NixOS error when setting programs.sway.package = pkgs.swayfx

Setting programs.sway.package = pkgs.swayfx in a Nix config will result in the following error:

error: Package, 'swayfx-0.2', did not specify any session names, as strings, in
       'passthru.providedSessions'. This is required when used as a session package.

       The session names can be looked up in:
         /nix/store/704ch74d0hh687ai5idcrwix3xcdwgn9-swayfx-0.2/share/xsessions
         /nix/store/704ch74d0hh687ai5idcrwix3xcdwgn9-swayfx-0.2/share/wayland-sessions
(use '--show-trace' to show detailed location information)

The swayfx nix package definition should include this session name

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 4
  • Comments: 19 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Is there a workaround to make it work currently?

Hi you can use this config for now

programs.sway = { enable = true; package = (pkgs.swayfx.overrideAttrs (old: { passthru.providedSessions = [ "sway" ]; }));};

it solve the problem for me 😃

This should be fixed now since https://github.com/NixOS/nixpkgs/pull/270013 was merged!

EDIT: Oops spoke to soon, still need https://github.com/NixOS/nixpkgs/pull/267261

Big thanks to @kira-bruneau for a great first stab at the issue and getting things organized, and @name-snrl and @quantenzitrone for implementing this in nixpkgs! Happy to announce this is completed 😃

Is there a workaround to make it work currently?