mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: Rely on D-Bus activation for colord, geoclue, and polkit.
* gnu/services/desktop.scm (colord-dmd-service): Remove. (colord-service-type): Adjust accordingly. (geoclue-dmd-service): Remove. (geoclue-service-type): Adjust accordingly. (polkit-dmd-service): Remove. (polkit-service-type): Adjust accordingly.
This commit is contained in:
parent
cde0402169
commit
26909789d0
1 changed files with 3 additions and 47 deletions
|
@ -245,17 +245,6 @@ (define %colord-accounts
|
|||
(home-directory "/var/empty")
|
||||
(shell #~(string-append #$shadow "/sbin/nologin")))))
|
||||
|
||||
(define (colord-dmd-service colord)
|
||||
"Return a dmd service for COLORD."
|
||||
;; TODO: Remove when D-Bus activation works.
|
||||
(list (dmd-service
|
||||
(documentation "Run the colord color management service.")
|
||||
(provision '(colord-daemon))
|
||||
(requirement '(dbus-system udev))
|
||||
(start #~(make-forkexec-constructor
|
||||
(list (string-append #$colord "/libexec/colord"))))
|
||||
(stop #~(make-kill-destructor)))))
|
||||
|
||||
(define colord-service-type
|
||||
(service-type (name 'colord)
|
||||
(extensions
|
||||
|
@ -263,8 +252,6 @@ (define colord-service-type
|
|||
(const %colord-accounts))
|
||||
(service-extension activation-service-type
|
||||
(const %colord-activation))
|
||||
(service-extension dmd-root-service-type
|
||||
colord-dmd-service)
|
||||
|
||||
;; Colord is a D-Bus service that dbus-daemon can
|
||||
;; activate.
|
||||
|
@ -343,23 +330,6 @@ (define (geoclue-dbus-service config)
|
|||
"GEOCLUE_CONFIG_FILE"
|
||||
(geoclue-configuration-file config))))
|
||||
|
||||
(define (geoclue-dmd-service config)
|
||||
"Return a GeoClue dmd service for CONFIG."
|
||||
;; TODO: Remove when D-Bus activation works.
|
||||
(let ((geoclue (geoclue-configuration-geoclue config))
|
||||
(config (geoclue-configuration-file config)))
|
||||
(list (dmd-service
|
||||
(documentation "Run the GeoClue location service.")
|
||||
(provision '(geoclue-daemon))
|
||||
(requirement '(dbus-system))
|
||||
|
||||
(start #~(make-forkexec-constructor
|
||||
(list (string-append #$geoclue "/libexec/geoclue"))
|
||||
#:user "geoclue"
|
||||
#:environment-variables
|
||||
(list (string-append "GEOCLUE_CONFIG_FILE=" #$config))))
|
||||
(stop #~(make-kill-destructor))))))
|
||||
|
||||
(define %geoclue-accounts
|
||||
(list (user-group (name "geoclue") (system? #t))
|
||||
(user-account
|
||||
|
@ -375,8 +345,6 @@ (define geoclue-service-type
|
|||
(extensions
|
||||
(list (service-extension dbus-root-service-type
|
||||
geoclue-dbus-service)
|
||||
(service-extension dmd-root-service-type
|
||||
geoclue-dmd-service)
|
||||
(service-extension account-service-type
|
||||
(const %geoclue-accounts))))))
|
||||
|
||||
|
@ -426,18 +394,6 @@ (define %polkit-accounts
|
|||
(define %polkit-pam-services
|
||||
(list (unix-pam-service "polkitd")))
|
||||
|
||||
(define (polkit-dmd-service polkit)
|
||||
"Return the <dmd-service> for POLKIT."
|
||||
;; TODO: Remove when D-Bus activation works.
|
||||
(list (dmd-service
|
||||
(documentation "Run the polkit privilege management service.")
|
||||
(provision '(polkit-daemon))
|
||||
(requirement '(dbus-system))
|
||||
|
||||
(start #~(make-forkexec-constructor
|
||||
(list (string-append #$polkit "/lib/polkit-1/polkitd"))))
|
||||
(stop #~(make-kill-destructor)))))
|
||||
|
||||
(define polkit-service-type
|
||||
;; TODO: Make it extensible so it can collect policy files from other
|
||||
;; services.
|
||||
|
@ -448,9 +404,7 @@ (define polkit-service-type
|
|||
(service-extension pam-root-service-type
|
||||
(const %polkit-pam-services))
|
||||
(service-extension dbus-root-service-type
|
||||
list)
|
||||
(service-extension dmd-root-service-type
|
||||
polkit-dmd-service)))))
|
||||
list)))))
|
||||
|
||||
(define* (polkit-service #:key (polkit polkit))
|
||||
"Return a service that runs the @command{polkit} privilege management
|
||||
|
@ -601,6 +555,8 @@ (define-syntax-rule (ini-file config file clause ...)
|
|||
|
||||
(define (elogind-dmd-service config)
|
||||
"Return a dmd service for elogind, using @var{config}."
|
||||
;; TODO: We could probably rely on service activation but the '.service'
|
||||
;; file currently contains an erroneous 'Exec' line.
|
||||
(let ((config-file (elogind-configuration-file config))
|
||||
(elogind (elogind-package config)))
|
||||
(list (dmd-service
|
||||
|
|
Loading…
Reference in a new issue