git.iko.soy/typeable/nixpkgs
on master help sign in
sway module: setcap binary, not wrapper
commit194d7852f70bfeb73dd598cf98ebf6e90f019f39 authorgnidorah <gnidorah@users.noreply.github.com> dateFri 3 Nov 2017, 21:00 (9 years ago) parent5c4352f
1 file changed+3−2
nixos/modules/programs/sway.nix+3−2
nixos/modules/programs/sway.nix+3−2
@@ -10,7 +10,7 @@ let
1010 #! ${pkgs.stdenv.shell}
1111 ${cfg.extraSessionCommands}
1212 PATH="${sway}/bin:$PATH"
13− exec ${pkgs.dbus.dbus-launch} --exit-with-session "${sway}/bin/sway"
13+ exec ${pkgs.dbus.dbus-launch} --exit-with-session sway-setcap
1414 '';
1515 swayJoined = pkgs.symlinkJoin {
1616 name = "sway-wrapped";
@@ -53,7 +53,8 @@ in
5353 config = mkIf cfg.enable {
5454 environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
5555 security.wrappers.sway = {
56− source = "${swayJoined}/bin/sway";
56+ program = "sway-setcap";
57+ source = "${sway}/bin/sway";
5758 capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
5859 owner = "root";
5960 group = "sway";