gnu: Add AccountsService service to desktop services.

* doc/guix.texi (Desktop Services): Add accountsservice-service.
* gnu/services/desktop.scm (%accountsservice-activation):
(accountsservice-service-type): New public variables.
(%desktop-services): Add accountsservice-service.
This commit is contained in:
Andy Wingo 2017-08-22 14:20:48 +02:00
parent e76008dbc8
commit 063c608261
No known key found for this signature in database
GPG key ID: A8803732E4436885
2 changed files with 52 additions and 8 deletions

View file

@ -11572,14 +11572,14 @@ This is a list of services that builds upon @var{%base-services} and
adds or adjusts services for a typical ``desktop'' setup. adds or adjusts services for a typical ``desktop'' setup.
In particular, it adds a graphical login manager (@pxref{X Window, In particular, it adds a graphical login manager (@pxref{X Window,
@code{slim-service}}), screen lockers, @code{slim-service}}), screen lockers, a network management tool
a network management tool (@pxref{Networking (@pxref{Networking Services, @code{wicd-service}}), energy and color
Services, @code{wicd-service}}), energy and color management services, management services, the @code{elogind} login and seat manager, the
the @code{elogind} login and seat manager, the Polkit privilege service, Polkit privilege service, the GeoClue location service, the
the GeoClue location service, an NTP client (@pxref{Networking AccountsService daemon that allows authorized users change system
Services}), the Avahi daemon, and has the name service switch service passwords, an NTP client (@pxref{Networking Services}), the Avahi
configured to be able to use @code{nss-mdns} (@pxref{Name Service daemon, and has the name service switch service configured to be able to
Switch, mDNS}). use @code{nss-mdns} (@pxref{Name Service Switch, mDNS}).
@end defvr @end defvr
The @var{%desktop-services} variable can be used as the @code{services} The @var{%desktop-services} variable can be used as the @code{services}
@ -11722,6 +11722,19 @@ their default values are:
@end table @end table
@end deffn @end deffn
@deffn {Scheme Procedure} accountsservice-service @
[#:accountsservice @var{accountsservice}]
Return a service that runs AccountsService, a system service that can
list available accounts, change their passwords, and so on.
AccountsService integrates with PolicyKit to enable unprivileged users
to acquire the capability to modify their system configuration.
@uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the
accountsservice web site} for more information.
The @var{accountsservice} keyword argument is the @code{accountsservice}
package to expose as a service.
@end deffn
@deffn {Scheme Procedure} polkit-service @ @deffn {Scheme Procedure} polkit-service @
[#:polkit @var{polkit}] [#:polkit @var{polkit}]
Return a service that runs the Return a service that runs the

View file

@ -73,6 +73,9 @@ (define-module (gnu services desktop)
elogind-service elogind-service
elogind-service-type elogind-service-type
accountsservice-service-type
accountsservice-service
gnome-desktop-configuration gnome-desktop-configuration
gnome-desktop-configuration? gnome-desktop-configuration?
gnome-desktop-service gnome-desktop-service
@ -703,6 +706,33 @@ (define* (elogind-service #:key (config (elogind-configuration)))
when they log out." when they log out."
(service elogind-service-type config)) (service elogind-service-type config))
;;;
;;; AccountsService service.
;;;
(define %accountsservice-activation
#~(begin
(use-modules (guix build utils))
(mkdir-p "/var/lib/AccountsService")))
(define accountsservice-service-type
(service-type (name 'accountsservice)
(extensions
(list (service-extension activation-service-type
(const %accountsservice-activation))
(service-extension dbus-root-service-type list)
(service-extension polkit-service-type list)))))
(define* (accountsservice-service #:key (accountsservice accountsservice))
"Return a service that runs AccountsService, a system service that
can list available accounts, change their passwords, and so on.
AccountsService integrates with PolicyKit to enable unprivileged users to
acquire the capability to modify their system configuration.
@uref{https://www.freedesktop.org/wiki/Software/AccountsService/, the
accountsservice web site} for more information."
(service accountsservice-service-type accountsservice))
;;; ;;;
;;; GNOME desktop service. ;;; GNOME desktop service.
@ -783,6 +813,7 @@ (define %desktop-services
(wicd-service) (wicd-service)
(udisks-service) (udisks-service)
(upower-service) (upower-service)
(accountsservice-service)
(colord-service) (colord-service)
(geoclue-service) (geoclue-service)
(polkit-service) (polkit-service)