summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorFranz Pletz <fpletz@fnordicwalking.de>2017-11-24 10:03:41 +0100
committerGitHub <noreply@github.com>2017-11-24 10:03:41 +0100
commit3ad0845fb024fc16bb4c2648e3fe68c5252aea75 (patch)
treedaca33f9013f8412d3e7f2e1fee932af500c0cfa /nixos
parenta59864c3c5b681a6630d977db6c0ea438fbb11a9 (diff)
parentd0bcade807ab4051df2b2ffc836deb495ab9949a (diff)
downloadnixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar.gz
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar.bz2
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar.lz
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar.xz
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.tar.zst
nixpkgs-3ad0845fb024fc16bb4c2648e3fe68c5252aea75.zip
Merge pull request #31371 from gnidorah/sway
sway module: passthrough sway binary when needed
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/programs/sway.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix
index 9070722c770..5d13b90daac 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 {