summaryrefslogtreecommitdiff
path: root/doc
diff options
context:
space:
mode:
author宋文武 <iyzsong@member.fsf.org>2017-07-04 20:40:36 +0800
committer宋文武 <iyzsong@member.fsf.org>2017-07-04 20:40:51 +0800
commit296bf4d5ab1cf7822956205b6d266c2c67ce056c (patch)
tree89a3ae0bfb26b55abaaa84c135031112785e8915 /doc
parenta522517cdba13ac5b11a8b2969ddb72d8fca2eca (diff)
downloadguix-patches-296bf4d5ab1cf7822956205b6d266c2c67ce056c.tar
guix-patches-296bf4d5ab1cf7822956205b6d266c2c67ce056c.tar.gz
services: Add 'sysctl-service-type'.
* gnu/services/sysctl.scm: New file. * doc/guix.texi (Miscellaneous Services): Document it. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
Diffstat (limited to 'doc')
-rw-r--r--doc/guix.texi29
1 files changed, 29 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 17492bfe59..eab1704d4d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -15276,6 +15276,35 @@ Package object of thermald.
@node Miscellaneous Services
@subsubsection Miscellaneous Services
+@cindex sysctl
+@subsubheading System Control Service
+
+The @code{(gnu services sysctl)} provides a service to configure kernel
+parameters at boot.
+
+@defvr {Scheme Variable} sysctl-service-type
+The service type for @command{sysctl}, which modifies kernel parameters
+under @file{/proc/sys/}. To enable IPv4 forwarding, it can be
+instantiated as:
+
+@example
+(service sysctl-service-type
+ (sysctl-configuration
+ (settings '(("net.ipv4.ip_forward" . "1")))))
+@end example
+@end defvr
+
+@deftp {Data Type} sysctl-configuration
+The data type representing the configuration of @command{sysctl}.
+
+@table @asis
+@item @code{sysctl} (default: @code{(file-append procps "/sbin/sysctl"})
+The @command{sysctl} executable to use.
+
+@item @code{settings} (default: @code{'()})
+An association list specifies kernel parameters and their values.
+@end table
+@end deftp
@cindex lirc
@subsubheading Lirc Service