Merge pull request #31201 from gnidorah/sway

sway module: setcap binary, not wrapper
This commit is contained in:
Tim Steinbach 2017-11-03 17:34:58 -04:00 committed by GitHub
commit 5925aebc03
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -10,7 +10,7 @@ let
#! ${pkgs.stdenv.shell}
${cfg.extraSessionCommands}
PATH="${sway}/bin:$PATH"
exec ${pkgs.dbus.dbus-launch} --exit-with-session "${sway}/bin/sway"
exec ${pkgs.dbus.dbus-launch} --exit-with-session sway-setcap
'';
swayJoined = pkgs.symlinkJoin {
name = "sway-wrapped";
@ -53,7 +53,8 @@ in
config = mkIf cfg.enable {
environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
security.wrappers.sway = {
source = "${swayJoined}/bin/sway";
program = "sway-setcap";
source = "${sway}/bin/sway";
capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
owner = "root";
group = "sway";