From b726096bc5fcef1b96554c679b81a34d49265f9c Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Fri, 20 Jan 2017 21:43:53 +0800 Subject: services: network-manager: Use record for configuration. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/network-manager.scm (): New record type. (network-manager-shpeherd-service): Change to use the network-manager-configuration record, rather than a package. Generate a simple configuration file from the network-manager-configuration record. (network-manager-service-type): Update extensions to take the network-manager-configuration rather than a package. (network-manager-service): Remove function, the network-manager-service-type can be used instead, and this avoids keeping the function signature and value coresponding to the service type in sync. * doc/guix.texi (Networking Services): Remove documentation for the removed network-manager-service procedure, and add documentation of the network-manager-service-type variable and network-manager-configuration record. Signed-off-by: 宋文武 --- doc/guix.texi | 40 +++++++++++++++++++++++++++++++++++----- 1 file changed, 35 insertions(+), 5 deletions(-) (limited to 'doc') diff --git a/doc/guix.texi b/doc/guix.texi index 7cd9cd046a..1f0bd7568d 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8758,11 +8758,41 @@ and @command{wicd-curses} user interfaces. @end deffn @cindex NetworkManager -@deffn {Scheme Procedure} network-manager-service @ - [#:network-manager @var{network-manager}] -Return a service that runs NetworkManager, a network connection manager -attempting to keep network connectivity active when available. -@end deffn + +@defvr {Scheme Variable} network-manager-service-type +This is the service type for the +@uref{https://wiki.gnome.org/Projects/NetworkManager, NetworkManager} +service. The value for this service type is a +@code{network-manager-configuration} record. +@end defvr + +@deftp {Data Type} network-manager-configuration +Data type representing the configuration of NetworkManager. + +@table @asis +@item @code{network-manager} (default: @code{network-manager}) +The NetworkManager package to use. + +@item @code{dns} (default: @code{"default"}) +Processing mode for DNS, which affects how NetworkManager uses the +@code{resolv.conf} configuration file. + +@table @samp +@item default +NetworkManager will update @code{resolv.conf} to reflect the nameservers +provided by currently active connections. + +@item dnsmasq +NetworkManager will run @code{dnsmasq} as a local caching nameserver, +using a "split DNS" configuration if you are connected to a VPN, and +then update @code{resolv.conf} to point to the local nameserver. + +@item none +NetworkManager will not modify @code{resolv.conf}. +@end table + +@end table +@end deftp @cindex Connman @deffn {Scheme Procedure} connman-service @ -- cgit v1.2.3