Skip to content

Commit

Permalink
nixos/keyd: Allow service to call nice syscall
Browse files Browse the repository at this point in the history
Otherwise it'll be killed by systemd with
Main process exited, code=killed, status=31/SYS

Signed-off-by: Daniel Schaefer <git@danielschaefer.me>
  • Loading branch information
JohnAZoidberg committed Jul 26, 2023
1 parent 1718e24 commit 6591d33
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions nixos/modules/services/hardware/keyd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ in
RuntimeDirectory = "keyd";

# Hardening
CapabilityBoundingSet = "";
CapabilityBoundingSet = [ "CAP_SYS_NICE" ];
DeviceAllow = [
"char-input rw"
"/dev/uinput rw"
Expand All @@ -142,7 +142,7 @@ in
PrivateNetwork = true;
ProtectHome = true;
ProtectHostname = true;
PrivateUsers = true;
PrivateUsers = false;
PrivateMounts = true;
PrivateTmp = true;
RestrictNamespaces = true;
Expand All @@ -155,9 +155,9 @@ in
LockPersonality = true;
ProtectProc = "invisible";
SystemCallFilter = [
"nice"
"@system-service"
"~@privileged"
"~@resources"
];
RestrictAddressFamilies = [ "AF_UNIX" ];
RestrictSUIDSGID = true;
Expand Down

0 comments on commit 6591d33

Please sign in to comment.