summary refs log tree commit diff
path: root/pkgs/applications/window-managers
diff options
context:
space:
mode:
authorKanashimia <chad@redpilled.dev>2023-10-24 21:38:32 +0300
committerGitHub <noreply@github.com>2023-10-24 21:38:32 +0300
commit952bb841aeadb56ab106eb62cdd128f446a47db0 (patch)
tree9e7565fdb19a983e1390e069c100be669894ff33 /pkgs/applications/window-managers
parent589c74ae5db720612899c5b6f6e8dcdc1b97a8fc (diff)
downloadnixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar.gz
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar.bz2
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar.lz
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar.xz
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.tar.zst
nixpkgs-952bb841aeadb56ab106eb62cdd128f446a47db0.zip
Revert "nixos/sway: add enableRealtime option"
Diffstat (limited to 'pkgs/applications/window-managers')
-rw-r--r--pkgs/applications/window-managers/sway/default.nix2
-rw-r--r--pkgs/applications/window-managers/sway/drop_ambient_capabilities.patch41
2 files changed, 0 insertions, 43 deletions
diff --git a/pkgs/applications/window-managers/sway/default.nix b/pkgs/applications/window-managers/sway/default.nix
index a830a6a5752..6e11d842fe9 100644
--- a/pkgs/applications/window-managers/sway/default.nix
+++ b/pkgs/applications/window-managers/sway/default.nix
@@ -44,8 +44,6 @@ stdenv.mkDerivation (finalAttrs: {
     # Use /run/current-system/sw/share and /etc instead of /nix/store
     # references:
     ./sway-config-nixos-paths.patch
-    # Drop ambient capabilities after getting SCHED_RR
-    ./drop_ambient_capabilities.patch
   ];
 
   strictDeps = true;
diff --git a/pkgs/applications/window-managers/sway/drop_ambient_capabilities.patch b/pkgs/applications/window-managers/sway/drop_ambient_capabilities.patch
deleted file mode 100644
index 17010ede25a..00000000000
--- a/pkgs/applications/window-managers/sway/drop_ambient_capabilities.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e7d9098e81289ae99d07ec3eac1fec1d303b8fe4 Mon Sep 17 00:00:00 2001
-From: Thiago Kenji Okada <thiagokokada@gmail.com>
-Date: Thu, 5 Oct 2023 15:23:35 +0100
-Subject: [PATCH] drop ambient capabilities
-
-Within NixOS the only possibility to gain cap_sys_nice is using the
-security.wrapper infrastructure. However to pass the capabilities to the
-wrapped program, they are raised to the ambient set. To fix this we make
-sure to drop the ambient capabilities during sway startup and realtime
-setup. Otherwise all programs started by sway also gain cap_sys_nice,
-which is not something we want.
-
-Co-authored-by: Rouven Czerwinski <rouven@czerwinskis.de>
----
- sway/realtime.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/sway/realtime.c b/sway/realtime.c
-index 11154af0..06f872a8 100644
---- a/sway/realtime.c
-+++ b/sway/realtime.c
-@@ -3,6 +3,7 @@
- #include <unistd.h>
- #include <pthread.h>
- #include "sway/server.h"
-+#include "sys/prctl.h"
- #include "log.h"
- 
- static void child_fork_callback(void) {
-@@ -10,6 +11,8 @@ static void child_fork_callback(void) {
- 
- 	param.sched_priority = 0;
- 
-+	prctl(PR_CAP_AMBIENT, PR_CAP_AMBIENT_CLEAR_ALL, 0, 0, 0);
-+
- 	int ret = pthread_setschedparam(pthread_self(), SCHED_OTHER, &param);
- 	if (ret != 0) {
- 		sway_log(SWAY_ERROR, "Failed to reset scheduler policy on fork");
--- 
-2.42.0
-