summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--doc/guix.texi26
-rw-r--r--gnu/services/desktop.scm33
2 files changed, 52 insertions, 7 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index ad018ffc8e..2289d8201d 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -26,7 +26,7 @@ Copyright @copyright{} 2016 Ben Woodcroft@*
Copyright @copyright{} 2016, 2017 Chris Marusich@*
Copyright @copyright{} 2016, 2017 Efraim Flashner@*
Copyright @copyright{} 2016 John Darrington@*
-Copyright @copyright{} 2016 ng0@*
+Copyright @copyright{} 2016, 2017 ng0@*
Copyright @copyright{} 2016, 2017 Jan Nieuwenhuizen@*
Copyright @copyright{} 2016 Julien Lepiller@*
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
machine running a graphical display server, possibly with graphical user
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
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
Reference, @code{services}}).
-Additionally, the @code{gnome-desktop-service} and
-@code{xfce-desktop-service} procedures can add GNOME and/or XFCE to a
-system. To ``add GNOME'' means that system-level services like the
+Additionally, the @code{gnome-desktop-service},
+@code{xfce-desktop-service} and @code{mate-desktop-service}
+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
added to the system, extending @code{polkit} and @code{dbus}
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''
file management window, if the user authenticates using the
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
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.
@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
-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{operating-system}:
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 78530b3454..64b999caba 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -4,6 +4,7 @@
;;; Copyright © 2015 Mark H Weaver <mhw@netris.org>
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
+;;; Copyright © 2017 ng0 <ng0@infotropique.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -42,6 +43,7 @@
#:use-module (gnu packages suckless)
#:use-module (gnu packages linux)
#:use-module (gnu packages libusb)
+ #:use-module (gnu packages mate)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
@@ -82,6 +84,11 @@
gnome-desktop-service
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-service
@@ -817,6 +824,32 @@ rules."
and extends polkit with the actions from @code{gnome-settings-daemon}."
(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.