From d2f906175254bf42388d5b2d219e14bdd19af327 Mon Sep 17 00:00:00 2001 From: Harald Hoyer Date: Wed, 23 Oct 2024 10:16:01 +0200 Subject: [PATCH] feat(x86_64-linux): increase file descriptor and memory limits Added configuration to increase the system-wide file descriptor limit and memory lock limit. This change involves updating systemd and PAM settings to enhance resource management. --- systems/x86_64-linux/x1/default.nix | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/systems/x86_64-linux/x1/default.nix b/systems/x86_64-linux/x1/default.nix index a78acb8..7cf7930 100644 --- a/systems/x86_64-linux/x1/default.nix +++ b/systems/x86_64-linux/x1/default.nix @@ -47,5 +47,12 @@ with lib.metacfg; services.trezord.enable = true; + systemd.user.extraConfig = "DefaultLimitNOFILE=32000"; + + security.pam.loginLimits = [ + { domain = "*"; item = "nofile"; type = "-"; value = "32768"; } + { domain = "*"; item = "memlock"; type = "-"; value = "32768"; } + ]; + system.stateVersion = "23.11"; }