diff --git a/nixos/modules/services/hardware/keyd.nix b/nixos/modules/services/hardware/keyd.nix index 724e9b956847..77297401a51c 100644 --- a/nixos/modules/services/hardware/keyd.nix +++ b/nixos/modules/services/hardware/keyd.nix @@ -143,7 +143,7 @@ in RuntimeDirectory = "keyd"; # Hardening - CapabilityBoundingSet = ""; + CapabilityBoundingSet = [ "CAP_SYS_NICE" ]; DeviceAllow = [ "char-input rw" "/dev/uinput rw" @@ -152,7 +152,7 @@ in PrivateNetwork = true; ProtectHome = true; ProtectHostname = true; - PrivateUsers = true; + PrivateUsers = false; PrivateMounts = true; PrivateTmp = true; RestrictNamespaces = true; @@ -165,9 +165,9 @@ in LockPersonality = true; ProtectProc = "invisible"; SystemCallFilter = [ + "nice" "@system-service" "~@privileged" - "~@resources" ]; RestrictAddressFamilies = [ "AF_UNIX" ]; RestrictSUIDSGID = true; diff --git a/pkgs/tools/inputmethods/keyd/default.nix b/pkgs/tools/inputmethods/keyd/default.nix index 810ade71bb32..95eb1a2339a9 100644 --- a/pkgs/tools/inputmethods/keyd/default.nix +++ b/pkgs/tools/inputmethods/keyd/default.nix @@ -8,13 +8,13 @@ }: let - version = "2.4.2"; + version = "2.4.3"; src = fetchFromGitHub { owner = "rvaiya"; repo = "keyd"; rev = "v" + version; - hash = "sha256-QWr+xog16MmybhQlEWbskYa/dypb9Ld54MOdobTbyMo="; + hash = "sha256-NhZnFIdK0yHgFR+rJm4cW+uEhuQkOpCSLwlXNQy6jas="; }; pypkgs = python3.pkgs; @@ -47,13 +47,14 @@ stdenv.mkDerivation { postPatch = '' substituteInPlace Makefile \ - --replace DESTDIR= DESTDIR=${placeholder "out"} \ --replace /usr "" substituteInPlace keyd.service \ --replace /usr/bin $out/bin ''; + installFlags = [ "DESTDIR=${placeholder "out"}" ]; + buildInputs = [ systemd ]; enableParallelBuilding = true;