From 194d7852f70bfeb73dd598cf98ebf6e90f019f39 Mon Sep 17 00:00:00 2001 From: gnidorah Date: Fri, 3 Nov 2017 21:00:46 +0300 Subject: [PATCH] sway module: setcap binary, not wrapper --- nixos/modules/programs/sway.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/modules/programs/sway.nix b/nixos/modules/programs/sway.nix index 2934fba96dda..9070722c770b 100644 --- a/nixos/modules/programs/sway.nix +++ b/nixos/modules/programs/sway.nix @@ -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";