summary refs log tree commit diff
diff options
context:
space:
mode:
authorNiklas Hambüchen <mail@nh2.me>2018-05-12 17:44:57 +0200
committerxeji <36407913+xeji@users.noreply.github.com>2018-05-12 17:44:57 +0200
commit7f79a4fe118943b0d8dcc3aa475079ad3cfd7986 (patch)
tree6581a9e5a01ee4c7e162840fe17f09df9a1dd331
parent0c321443d54570148f780cd402cdd72afb6a27d7 (diff)
downloadnixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar.gz
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar.bz2
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar.lz
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar.xz
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.tar.zst
nixlib-7f79a4fe118943b0d8dcc3aa475079ad3cfd7986.zip
manual: Clarify that limits.conf doesn't apply to systemd services. (#40267)
Say how systemd services can be set instead.

Sources:

* https://bugzilla.redhat.com/show_bug.cgi?id=754285
* https://ro-che.info/articles/2017-03-26-increase-open-files-limit

Signed-off-by: Niklas Hambüchen <mail@nh2.me>
-rw-r--r--nixos/modules/security/pam.nix4
-rw-r--r--nixos/modules/system/boot/coredump.nix7
2 files changed, 9 insertions, 2 deletions
diff --git a/nixos/modules/security/pam.nix b/nixos/modules/security/pam.nix
index 48998285d89d..bef10b4fe614 100644
--- a/nixos/modules/security/pam.nix
+++ b/nixos/modules/security/pam.nix
@@ -449,6 +449,10 @@ in
           <varname>item</varname>, and <varname>value</varname>
           attribute.  The syntax and semantics of these attributes
           must be that described in the limits.conf(5) man page.
+
+          Note that these limits do not apply to systemd services,
+          whose limits can be changed via <option>systemd.extraConfig</option>
+          instead.
        '';
     };
 
diff --git a/nixos/modules/system/boot/coredump.nix b/nixos/modules/system/boot/coredump.nix
index b27a35b6257d..30f367da7666 100644
--- a/nixos/modules/system/boot/coredump.nix
+++ b/nixos/modules/system/boot/coredump.nix
@@ -15,8 +15,11 @@ with lib;
           Enables storing core dumps in systemd.
           Note that this alone is not enough to enable core dumps. The maximum
           file size for core dumps must be specified in limits.conf as well. See
-          <option>security.pam.loginLimits</option> as well as the limits.conf(5)
-          man page.
+          <option>security.pam.loginLimits</option> and the limits.conf(5)
+          man page (these specify the core dump limits for user login sessions)
+          and <option>systemd.extraConfig</option> (where e.g.
+          <literal>DefaultLimitCORE=1000000</literal> can be specified to set
+          the core dump limit for systemd system-level services).
         '';
       };