diff options
author | Bruno Victal <mirai@makinata.eu> | 2023-03-04 21:17:39 +0000 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-03-30 23:18:16 +0200 |
commit | 6d0ad930206dccf382ec65c6504df51b5c798a34 (patch) | |
tree | 6f70760189ac43f95d5ad218ecff0737b71942e6 /doc/guix.texi | |
parent | ed5053188565063b353711772fc2dc3ca50e8568 (diff) | |
download | guix-6d0ad930206dccf382ec65c6504df51b5c798a34.tar guix-6d0ad930206dccf382ec65c6504df51b5c798a34.tar.gz |
services: pam-limits-service-type: Deprecate file-like object support in favour for lists as service value.
* doc/guix.texi (Base Services): Document it.
* gnu/local.mk: Register test.
* gnu/services/base.scm (pam-limits-service-type): Accept both lists and
file-like objects. Deprecate file-like object support.
* gnu/tests/pam.scm: New file.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Diffstat (limited to 'doc/guix.texi')
-rw-r--r-- | doc/guix.texi | 27 |
1 files changed, 10 insertions, 17 deletions
diff --git a/doc/guix.texi b/doc/guix.texi index c5f5558e2c..a58ea8f9ec 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -18971,23 +18971,18 @@ will fail if @var{device} does not exist. Type of the service that installs a configuration file for the @uref{http://linux-pam.org/Linux-PAM-html/sag-pam_limits.html, @code{pam_limits} module}. The value for this service type is -a file-like object containing a list of @code{pam-limits-entry} values -which can be used to specify @code{ulimit} limits and @code{nice} -priority limits to user sessions. +a list of @code{pam-limits-entry} values, which can be used to specify +@code{ulimit} limits and @code{nice} priority limits to user sessions. +By default, the value is the empty list. The following limits definition sets two hard and soft limits for all login sessions of users in the @code{realtime} group: @lisp -(service - pam-limits-service-type - (plain-file - "limits.conf" - (string-join - (map pam-limits-entry->string - (list (pam-limits-entry "@@realtime" 'both 'rtprio 99) - (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) - "\n"))) +(service pam-limits-service-type + (list + (pam-limits-entry "@@realtime" 'both 'rtprio 99) + (pam-limits-entry "@@realtime" 'both 'memlock 'unlimited))) @end lisp The first entry increases the maximum realtime priority for @@ -18999,11 +18994,9 @@ Another useful example is raising the maximum number of open file descriptors that can be used: @lisp -(service - pam-limits-service-type - (plain-file - "limits.conf" - (pam-limits-entry->string (pam-limits-entry "*" 'both 'nofile 100000)))) +(service pam-limits-service-type + (list + (pam-limits-entry "*" 'both 'nofile 100000))) @end lisp In the above example, the asterisk means the limit should apply to any |