Created
April 14, 2020 13:26
-
-
Save msteen/685e129cd7e4344036827451ec3faa68 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ # Limits | |
# We increase to inotify limits since the defaults are easily exceeded. | |
boot.kernel.sysctl = { | |
"fs.inotify.max_user_instances" = 4096; | |
"fs.inotify.max_user_watches" = 524288; | |
}; | |
# Be very generous with resource restrictions. | |
# Should be lower than the value defined in /proc/sys/fs/file-max. | |
# The domain * excludes root, so we need repeat it for root. | |
security.pam.loginLimits = | |
flip concatMap [ "*" "root" ] (domain: | |
flip concatMap [ "nproc" "nofile" ] (item: | |
flip map [ "soft" "hard" ] (type: | |
{ inherit domain; inherit item; inherit type; value = "65536"; } | |
))); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment