From 6a884de15a1afed2884b88b05ee66f7e29788b49 Mon Sep 17 00:00:00 2001 From: Gabriel Arazas Date: Sat, 24 Sep 2022 13:07:56 +0800 Subject: [PATCH] profiles/system: configure limits for audio setup --- modules/nixos/profiles/system.nix | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/modules/nixos/profiles/system.nix b/modules/nixos/profiles/system.nix index f067b6b2..1204cb9f 100644 --- a/modules/nixos/profiles/system.nix +++ b/modules/nixos/profiles/system.nix @@ -93,6 +93,22 @@ in { pulse.enable = true; jack.enable = true; }; + + # This is based from https://jackaudio.org/faq/linux_rt_config.html. + security.pam.loginLimits = [ + { + domain = "@audio"; + type = "-"; + item = "rtprio"; + value = "95"; + } + { + domain = "@audio"; + type = "-"; + item = "memlock"; + value = "unlimited"; + } + ]; }) (lib.mkIf cfg.fonts.enable {