From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:57131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1f1cNC-0001Jj-2e for guix-patches@gnu.org; Thu, 29 Mar 2018 14:34:07 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1f1cN8-0004tp-23 for guix-patches@gnu.org; Thu, 29 Mar 2018 14:34:06 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:51113) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1f1cN7-0004tU-V6 for guix-patches@gnu.org; Thu, 29 Mar 2018 14:34:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1f1cN7-00014d-JM for guix-patches@gnu.org; Thu, 29 Mar 2018 14:34:01 -0400 Subject: [bug#30991] [PATCH 1/2] services: Add modem-manager-service-type. Resent-Message-ID: From: Danny Milosavljevic Date: Thu, 29 Mar 2018 20:33:46 +0200 Message-Id: <20180329183347.7748-1-dannym@scratchpost.org> In-Reply-To: <20180329182856.7509-1-dannym@scratchpost.org> References: <20180329182856.7509-1-dannym@scratchpost.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 30991@debbugs.gnu.org * gnu/services/networking.scm (modem-manager-service-type): New variable. (): New variable. (modem-manager-configuration): New procedure. (modem-manager-configuration?): New procedure. * doc/guix.texi (Networking Services): Document it. --- doc/guix.texi | 22 ++++++++++++++++++++++ gnu/services/networking.scm | 35 +++++++++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) diff --git a/doc/guix.texi b/doc/guix.texi index 25c08b9f0..23b7ae089 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10712,6 +10712,28 @@ several commands to interact with the daemon and configure networking: and @command{wicd-curses} user interfaces. @end deffn +@cindex ModemManager + +@defvr {Scheme Variable} modem-manager-service-type +This is the service type for the +@uref{https://wiki.gnome.org/Projects/ModemManager, ModemManager} +service. The value for this service type is a +@code{modem-manager-configuration} record. + +This service is part of @code{%desktop-services} (@pxref{Desktop +Services}). +@end defvr + +@deftp {Data Type} modem-manager-configuration +Data type representing the configuration of ModemManager. + +@table @asis +@item @code{modem-manager} (default: @code{modem-manager}) +The ModemManager package to use. + +@end table +@end deftp + @cindex NetworkManager @defvr {Scheme Variable} network-manager-service-type diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 6ac440fd2..660ec162b 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -30,6 +30,7 @@ #:use-module (gnu system pam) #:use-module (gnu packages admin) #:use-module (gnu packages connman) + #:use-module (gnu packages freedesktop) #:use-module (gnu packages linux) #:use-module (gnu packages tor) #:use-module (gnu packages messaging) @@ -90,6 +91,9 @@ connman-configuration? connman-service-type + modem-manager-configuration + modem-manager-configuration? + modem-manager-service-type wpa-supplicant-service-type openvswitch-service-type @@ -890,6 +894,17 @@ and @command{wicd-curses} user interfaces." (service wicd-service-type wicd)) +;;; +;;; ModemManager +;;; + +(define-record-type* + modem-manager-configuration make-modem-manager-configuration + modem-manager-configuration? + (modem-manager modem-manager-configuration-modem-manager + (default modem-manager))) + + ;;; ;;; NetworkManager ;;; @@ -1027,6 +1042,26 @@ wireless networking.")))) a network connection manager.")))) +;;; +;;; Modem manager +;;; + +(define modem-manager-service-type + (let ((config->package + (match-lambda + (($ modem-manager) + (list modem-manager))))) + (service-type (name 'modem-manager) + (extensions + (list (service-extension dbus-root-service-type + config->package))) + (default-value (modem-manager-configuration)) + (description + "Run @uref{https://wiki.gnome.org/Projects/ModemManager, +ModemManager}, a modem management daemon that aims to simplify dialup +networking.")))) + + ;;; ;;; WPA supplicant ;;;