diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index 9070722c770b..5d13b90daace 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -8,8 +8,11 @@ let swayWrapped = pkgs.writeScriptBin "sway" '' #! ${pkgs.stdenv.shell} + if [ "$1" != "" ]; then + sway-setcap "$@" + exit + fi ${cfg.extraSessionCommands} - PATH="${sway}/bin:$PATH" exec ${pkgs.dbus.dbus-launch} --exit-with-session sway-setcap ''; swayJoined = pkgs.symlinkJoin {