nixos-module: allow LimitNOFILE=100000

This commit is contained in:
Astro 2022-11-11 23:19:37 +01:00
parent 663db47973
commit 9dd6647789
1 changed files with 8 additions and 2 deletions

View File

@ -26,6 +26,8 @@ let
builtins.toJSON gathererSettings
);
limitNOFILE = 1000000;
in
{
options.services.caveman = with lib; {
@ -68,6 +70,10 @@ in
};
config = {
systemd.extraConfig = ''
DefaultLimitNOFILE=${toString limitNOFILE}
'';
services.redis.servers.caveman = lib.mkIf cfg.hunter.enable {
enable = true;
port = cfg.redis.port;
@ -100,7 +106,7 @@ in
RestrictRealtime = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
LimitNOFile = 100000;
LimitNOFile = limitNOFILE;
};
};
@ -126,7 +132,7 @@ in
RestrictRealtime = true;
LockPersonality = true;
MemoryDenyWriteExecute = true;
LimitNOFile = 100000;
LimitNOFile = limitNOFILE;
WorkingDirectory = "${pkgs.caveman-gatherer}/share/caveman/gatherer";
};
};