summary refs log tree commit diff
path: root/nixos/modules/programs
diff options
context:
space:
mode:
authorgnidorah <gnidorah@users.noreply.github.com>2017-11-07 20:31:49 +0300
committergnidorah <gnidorah@users.noreply.github.com>2017-11-07 22:02:22 +0300
commitd0bcade807ab4051df2b2ffc836deb495ab9949a (patch)
tree77ffffb3aa9885932b05e839ad25666fb07d7adb /nixos/modules/programs
parent34f3ef2c4d590a85ccebddf9537a5315abd9c137 (diff)
downloadnixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar.gz
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar.bz2
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar.lz
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar.xz
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.tar.zst
nixlib-d0bcade807ab4051df2b2ffc836deb495ab9949a.zip
sway module: passthrough sway binary when needed
Diffstat (limited to 'nixos/modules/programs')
-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 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 {