mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 06:00:33 +03:00
sway module: setcap binary, not wrapper
This commit is contained in:
parent
5c4352fa2d
commit
194d7852f7
1 changed files with 3 additions and 2 deletions
|
@ -10,7 +10,7 @@ let
|
||||||
#! ${pkgs.stdenv.shell}
|
#! ${pkgs.stdenv.shell}
|
||||||
${cfg.extraSessionCommands}
|
${cfg.extraSessionCommands}
|
||||||
PATH="${sway}/bin:$PATH"
|
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 {
|
swayJoined = pkgs.symlinkJoin {
|
||||||
name = "sway-wrapped";
|
name = "sway-wrapped";
|
||||||
|
@ -53,7 +53,8 @@ in
|
||||||
config = mkIf cfg.enable {
|
config = mkIf cfg.enable {
|
||||||
environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
|
environment.systemPackages = [ swayJoined ] ++ cfg.extraPackages;
|
||||||
security.wrappers.sway = {
|
security.wrappers.sway = {
|
||||||
source = "${swayJoined}/bin/sway";
|
program = "sway-setcap";
|
||||||
|
source = "${sway}/bin/sway";
|
||||||
capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
|
capabilities = "cap_sys_ptrace,cap_sys_tty_config=eip";
|
||||||
owner = "root";
|
owner = "root";
|
||||||
group = "sway";
|
group = "sway";
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue