[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
02/03: services: Add udev rules for (upower colord elogind) to %desktop-
From: |
Mark H. Weaver |
Subject: |
02/03: services: Add udev rules for (upower colord elogind) to %desktop-services. |
Date: |
Thu, 10 Sep 2015 23:49:55 +0000 |
mhw pushed a commit to branch master
in repository guix.
commit 4307c476c407982ee80e6aa2de4a7e2209789912
Author: Mark H Weaver <address@hidden>
Date: Thu Sep 3 17:12:38 2015 -0400
services: Add udev rules for (upower colord elogind) to %desktop-services.
* gnu/services/desktop.scm (%desktop-services): Replace the 'udev-service'
from %base-services.
* gnu/services/base.scm (%base-services): Add a comment to keep them in
sync.
---
gnu/services/base.scm | 4 ++++
gnu/services/desktop.scm | 25 ++++++++++++++++++++-----
2 files changed, 24 insertions(+), 5 deletions(-)
diff --git a/gnu/services/base.scm b/gnu/services/base.scm
index 888e446..7f37b3d 100644
--- a/gnu/services/base.scm
+++ b/gnu/services/base.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2013, 2014, 2015 Ludovic Courtès <address@hidden>
;;; Copyright © 2015 Alex Kost <address@hidden>
+;;; Copyright © 2015 Mark H Weaver <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -884,6 +885,9 @@ This is the GNU operating system, welcome!\n\n")))
;; The LVM2 rules are needed as soon as LVM2 or the device-mapper is
;; used, so enable them by default. The FUSE and ALSA rules are
;; less critical, but handy.
+ ;;
+ ;; XXX Keep this in sync with the 'udev-service' call in
+ ;; %desktop-services.
(udev-service #:rules (list lvm2 fuse alsa-utils crda)))))
;;; base.scm ends here
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 1bf3db0..6017449 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2014, 2015 Ludovic Courtès <address@hidden>
;;; Copyright © 2015 Andy Wingo <address@hidden>
+;;; Copyright © 2015 Mark H Weaver <address@hidden>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -32,6 +33,8 @@
#:use-module (gnu packages avahi)
#:use-module (gnu packages wicd)
#:use-module (gnu packages polkit)
+ #:use-module ((gnu packages linux)
+ #:select (lvm2 fuse alsa-utils crda))
#:use-module (guix monads)
#:use-module (guix records)
#:use-module (guix store)
@@ -593,12 +596,24 @@ when they log out."
(ntp-service)
(map (lambda (mservice)
- ;; Provide an nscd ready to use nss-mdns.
(mlet %store-monad ((service mservice))
- (if (memq 'nscd (service-provision service))
- (nscd-service (nscd-configuration)
- #:name-services (list nss-mdns))
- mservice)))
+ (cond
+ ;; Provide an nscd ready to use nss-mdns.
+ ((memq 'nscd (service-provision service))
+ (nscd-service (nscd-configuration)
+ #:name-services (list nss-mdns)))
+
+ ;; Add more rules to udev-service.
+ ;;
+ ;; XXX Keep this in sync with the 'udev-service' call in
+ ;; %base-services. Here we intend only to add 'upower',
+ ;; 'colord', and 'elogind'.
+ ((memq 'udev (service-provision service))
+ (udev-service #:rules
+ (list lvm2 fuse alsa-utils crda
+ upower colord elogind)))
+
+ (else mservice))))
%base-services)))
;;; desktop.scm ends here