nixos-module/server/lxc-containers: bump kernel limits

This commit is contained in:
Astro 2021-06-18 20:20:04 +02:00
parent 82c982aa2b
commit 250089b22f
1 changed files with 11 additions and 0 deletions

View File

@ -141,6 +141,17 @@ let
'';
in
{
boot.kernel.sysctl = {
"fs.inotify.max_queued_events" = 1048576;
"fs.inotify.max_user_instances" = 1048576;
"fs.inotify.max_user_watches" = 1048576;
"vm.max_map_count" = 262144;
"kernel.dmesg_restrict" = 1;
"net.ipv4.neigh.default.gc_thresh3" = 8192;
"net.ipv6.neigh.default.gc_thresh3" = 8192;
"kernel.keys.maxkeys" = 2000;
};
virtualisation.lxc = lib.mkIf enabled {
enable = true;
# Container configs live in /etc so that they can be created