[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/02: services: Add modem-manager-service-type.
From: |
Danny Milosavljevic |
Subject: |
02/02: services: Add modem-manager-service-type. |
Date: |
Sun, 29 Apr 2018 21:47:25 -0400 (EDT) |
dannym pushed a commit to branch master
in repository guix.
commit d94e81dbfc2613f2e3f89500e2a87421f57a032c
Author: Danny Milosavljevic <address@hidden>
Date: Fri Mar 30 00:21:39 2018 +0200
services: Add modem-manager-service-type.
* gnu/services/networking.scm (modem-manager-service-type): New variable.
(<modem-manager-configuration>): New variable.
(modem-manager-configuration): New procedure.
(modem-manager-configuration?): New procedure.
* doc/guix.texi (Networking Services): Document it.
* gnu/tests/networking.scm: Import (gnu services base).
---
doc/guix.texi | 22 ++++++++++++++++++++++
gnu/services/networking.scm | 39 +++++++++++++++++++++++++++++++++++++++
gnu/tests/networking.scm | 1 +
3 files changed, 62 insertions(+)
diff --git a/doc/guix.texi b/doc/guix.texi
index 75886e9..58c3688 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -10773,6 +10773,28 @@ several commands to interact with the daemon and
configure networking:
and @command{wicd-curses} user interfaces.
@end deffn
address@hidden ModemManager
+
address@hidden {Scheme Variable} modem-manager-service-type
+This is the service type for the
address@hidden://wiki.gnome.org/Projects/ModemManager, ModemManager}
+service. The value for this service type is a
address@hidden record.
+
+This service is part of @code{%desktop-services} (@pxref{Desktop
+Services}).
address@hidden defvr
+
address@hidden {Data Type} modem-manager-configuration
+Data type representing the configuration of ModemManager.
+
address@hidden @asis
address@hidden @code{modem-manager} (default: @code{modem-manager})
+The ModemManager package to use.
+
address@hidden table
address@hidden deftp
+
@cindex NetworkManager
@defvr {Scheme Variable} network-manager-service-type
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 400b691..67674e8 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -31,6 +31,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)
@@ -92,6 +93,9 @@
connman-configuration?
connman-service-type
+ modem-manager-configuration
+ modem-manager-configuration?
+ modem-manager-service-type
wpa-supplicant-service-type
openvswitch-service-type
@@ -811,6 +815,17 @@ and @command{wicd-curses} user interfaces."
;;;
+;;; ModemManager
+;;;
+
+(define-record-type* <modem-manager-configuration>
+ modem-manager-configuration make-modem-manager-configuration
+ modem-manager-configuration?
+ (modem-manager modem-manager-configuration-modem-manager
+ (default modem-manager)))
+
+
+;;;
;;; NetworkManager
;;;
@@ -948,6 +963,30 @@ a network connection manager."))))
;;;
+;;; Modem manager
+;;;
+
+(define modem-manager-service-type
+ (let ((config->package
+ (match-lambda
+ (($ <modem-manager-configuration> modem-manager)
+ (list modem-manager)))))
+ (service-type (name 'modem-manager)
+ (extensions
+ (list (service-extension dbus-root-service-type
+ config->package)
+ (service-extension udev-service-type
+ config->package)
+ (service-extension polkit-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
;;;
diff --git a/gnu/tests/networking.scm b/gnu/tests/networking.scm
index 171c636..323679e 100644
--- a/gnu/tests/networking.scm
+++ b/gnu/tests/networking.scm
@@ -22,6 +22,7 @@
#:use-module (gnu system)
#:use-module (gnu system vm)
#:use-module (gnu services)
+ #:use-module (gnu services base)
#:use-module (gnu services networking)
#:use-module (guix gexp)
#:use-module (guix store)