about summary refs log tree commit diff
path: root/nixos/modules
diff options
context:
space:
mode:
authorTim Steinbach <NeQuissimus@users.noreply.github.com>2017-11-03 17:34:58 -0400
committerGitHub <noreply@github.com>2017-11-03 17:34:58 -0400
commit5925aebc03b45f927855430b8b0b36ddeb5475b0 (patch)
tree3c4a290bd674c7047b1ebde50f725157c29ceaa2 /nixos/modules
parent4142887d4a993a43953175e24a546dba654b4d73 (diff)
parent194d7852f70bfeb73dd598cf98ebf6e90f019f39 (diff)
downloadnixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar.gz
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar.bz2
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar.lz
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar.xz
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.tar.zst
nixlib-5925aebc03b45f927855430b8b0b36ddeb5475b0.zip
Merge pull request #31201 from gnidorah/sway
sway module: setcap binary, not wrapper
Diffstat (limited to 'nixos/modules')
-rw-r--r--nixos/modules/programs/sway.nix5
1 files 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";