gnu: services: Add MATE desktop service.

* gnu/services/desktop.scm (<mate-desktop-configuration>,
mate-desktop-service-type): New variable.
(mate-desktop-service): New public variable.

* doc/guix.texi (Desktop Services): Document the service.

Signed-off-by: Danny Milosavljevic <dannym@scratchpost.org>
This commit is contained in:
ng0 2017-12-30 22:52:54 +01:00 committed by Danny Milosavljevic
parent 6ce4fc69f5
commit 431703ffd0
No known key found for this signature in database
GPG Key ID: E71A35542C30BAA5
2 changed files with 52 additions and 7 deletions

View File

@ -26,7 +26,7 @@ Copyright @copyright{} 2016 Ben Woodcroft@*
Copyright @copyright{} 2016, 2017 Chris Marusich@* Copyright @copyright{} 2016, 2017 Chris Marusich@*
Copyright @copyright{} 2016, 2017 Efraim Flashner@* Copyright @copyright{} 2016, 2017 Efraim Flashner@*
Copyright @copyright{} 2016 John Darrington@* Copyright @copyright{} 2016 John Darrington@*
Copyright @copyright{} 2016 ng0@* Copyright @copyright{} 2016, 2017 ng0@*
Copyright @copyright{} 2016, 2017 Jan Nieuwenhuizen@* Copyright @copyright{} 2016, 2017 Jan Nieuwenhuizen@*
Copyright @copyright{} 2016 Julien Lepiller@* Copyright @copyright{} 2016 Julien Lepiller@*
Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016 Alex ter Weele@*
@ -12106,7 +12106,7 @@ The @code{(gnu services desktop)} module provides services that are
usually useful in the context of a ``desktop'' setup---that is, on a usually useful in the context of a ``desktop'' setup---that is, on a
machine running a graphical display server, possibly with graphical user machine running a graphical display server, possibly with graphical user
interfaces, etc. It also defines services that provide specific desktop interfaces, etc. It also defines services that provide specific desktop
environments like GNOME and XFCE. environments like GNOME, XFCE or MATE.
To simplify things, the module defines a variable containing the set of To simplify things, the module defines a variable containing the set of
services that users typically expect on a machine with a graphical services that users typically expect on a machine with a graphical
@ -12131,9 +12131,10 @@ The @var{%desktop-services} variable can be used as the @code{services}
field of an @code{operating-system} declaration (@pxref{operating-system field of an @code{operating-system} declaration (@pxref{operating-system
Reference, @code{services}}). Reference, @code{services}}).
Additionally, the @code{gnome-desktop-service} and Additionally, the @code{gnome-desktop-service},
@code{xfce-desktop-service} procedures can add GNOME and/or XFCE to a @code{xfce-desktop-service} and @code{mate-desktop-service}
system. To ``add GNOME'' means that system-level services like the procedures can add GNOME, XFCE and/or MATE to a system.
To ``add GNOME'' means that system-level services like the
backlight adjustment helpers and the power management utilities are backlight adjustment helpers and the power management utilities are
added to the system, extending @code{polkit} and @code{dbus} added to the system, extending @code{polkit} and @code{dbus}
appropriately, allowing GNOME to operate with elevated privileges on a appropriately, allowing GNOME to operate with elevated privileges on a
@ -12144,6 +12145,11 @@ not only adds the @code{xfce} metapackage to the system profile, but it
also gives the Thunar file manager the ability to open a ``root-mode'' also gives the Thunar file manager the ability to open a ``root-mode''
file management window, if the user authenticates using the file management window, if the user authenticates using the
administrator's password via the standard polkit graphical interface. administrator's password via the standard polkit graphical interface.
To ``add MATE'' means that @code{polkit} and @code{dbus} are extended
appropriately, allowing MATE to operate with elevated privileges on a
limited number of special-purpose system interfaces. Additionally,
adding a service made by @code{mate-desktop-service} adds the MATE
metapackage to the system profile.
@deffn {Scheme Procedure} gnome-desktop-service @deffn {Scheme Procedure} gnome-desktop-service
Return a service that adds the @code{gnome} package to the system Return a service that adds the @code{gnome} package to the system
@ -12158,9 +12164,15 @@ file system as root from within a user session, after the user has
authenticated with the administrator's password. authenticated with the administrator's password.
@end deffn @end deffn
Because the GNOME and XFCE desktop services pull in so many packages, @deffn {Scheme Procedure} mate-desktop-service
Return a service that adds the @code{mate} package to the system
profile, and extends polkit with the actions from
@code{mate-settings-daemon}.
@end deffn
Because the GNOME, XFCE and MATE desktop services pull in so many packages,
the default @code{%desktop-services} variable doesn't include either of the default @code{%desktop-services} variable doesn't include either of
them by default. To add GNOME or XFCE, just @code{cons} them onto them by default. To add GNOME, XFCE orMATE, just @code{cons} them onto
@code{%desktop-services} in the @code{services} field of your @code{%desktop-services} in the @code{services} field of your
@code{operating-system}: @code{operating-system}:

View File

@ -4,6 +4,7 @@
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com> ;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2017 ng0 <ng0@infotropique.org>
;;; ;;;
;;; This file is part of GNU Guix. ;;; This file is part of GNU Guix.
;;; ;;;
@ -42,6 +43,7 @@
#:use-module (gnu packages suckless) #:use-module (gnu packages suckless)
#:use-module (gnu packages linux) #:use-module (gnu packages linux)
#:use-module (gnu packages libusb) #:use-module (gnu packages libusb)
#:use-module (gnu packages mate)
#:use-module (guix records) #:use-module (guix records)
#:use-module (guix packages) #:use-module (guix packages)
#:use-module (guix store) #:use-module (guix store)
@ -82,6 +84,11 @@
gnome-desktop-service gnome-desktop-service
gnome-desktop-service-type gnome-desktop-service-type
mate-desktop-configuration
mate-desktop-configuration?
mate-desktop-service
mate-desktop-service-type
xfce-desktop-configuration xfce-desktop-configuration
xfce-desktop-configuration? xfce-desktop-configuration?
xfce-desktop-service xfce-desktop-service
@ -817,6 +824,32 @@ rules."
and extends polkit with the actions from @code{gnome-settings-daemon}." and extends polkit with the actions from @code{gnome-settings-daemon}."
(service gnome-desktop-service-type config)) (service gnome-desktop-service-type config))
;; MATE Desktop service.
;; TODO: Add mate-screensaver.
(define-record-type* <mate-desktop-configuration> mate-desktop-configuration
make-mate-desktop-configuration
mate-desktop-configuration
(mate-package mate-package (default mate)))
(define mate-desktop-service-type
(service-type
(name 'mate-desktop)
(extensions
(list (service-extension polkit-service-type
(compose list
(package-direct-input-selector
"mate-settings-daemon")
mate-package))
(service-extension profile-service-type
(compose list
mate-package))))))
(define* (mate-desktop-service #:key (config (mate-desktop-configuration)))
"Return a service that adds the @code{mate} package to the system profile,
and extends polkit with the actions from @code{mate-settings-daemon}."
(service mate-desktop-service-type config))
;;; ;;;
;;; XFCE desktop service. ;;; XFCE desktop service.