Reference, @code{services}}).
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}
+@code{xfce-desktop-service}, @code{mate-desktop-service} and
+@code{enlightenment-desktop-service-type} procedures can add GNOME, XFCE, MATE
+and/or Enlightenment 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
limited number of special-purpose system interfaces. Additionally,
adding a service made by @code{gnome-desktop-service} adds the GNOME
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.
+metapackage to the system profile. ``Adding ENLIGHTENMENT'' means that
+@code{dbus} is extended appropriately, and several of Enlightenment's binaries
+are set as setuid, allowing Enlightenment's screen locker and other
+functionality to work as expetected.
The desktop environments in Guix use the Xorg display server by
default. If you'd like to use the newer display server protocol
@code{mate-settings-daemon}.
@end deffn
+@deffn {Scheme Procedure} enlightenment-desktop-service-type
+Return a service that adds the @code{enlightenment} package to the system
+profile, and extends dbus with actions from @code{efl}.
+@end deffn
+
+@deftp {Data Type} enlightenment-desktop-service-configuration
+@table @asis
+@item @code{enlightenment} (default @code{enlightenment})
+The enlightenment package to use.
+@end table
+@end deftp
+
Because the GNOME, XFCE and MATE desktop services pull in so many packages,
the default @code{%desktop-services} variable doesn't include any of
them by default. To add GNOME, XFCE or MATE, just @code{cons} them onto
;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com>
;;; Copyright © 2017 Maxim Cournoyer <maxim.cournoyer@gmail.com>
;;; Copyright © 2017 Nils Gillmann <ng0@n0.is>
+;;; Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu services sound)
#:use-module ((gnu system file-systems)
#:select (%elogind-file-systems))
+ #:use-module (gnu system)
#:use-module (gnu system shadow)
#:use-module (gnu system pam)
#:use-module (gnu packages glib)
#:use-module (gnu packages linux)
#:use-module (gnu packages libusb)
#:use-module (gnu packages mate)
+ #:use-module (gnu packages enlightenment)
#:use-module (guix records)
#:use-module (guix packages)
#:use-module (guix store)
+ #:use-module (guix utils)
#:use-module (guix gexp)
#:use-module (srfi srfi-1)
#:use-module (ice-9 match)
x11-socket-directory-service
+ enlightenment-desktop-configuration
+ enlightenment-desktop-configuration?
+ enlightenment-desktop-service-type
+
%desktop-services))
;;; Commentary:
(let ((directory "/tmp/.X11-unix"))
(mkdir-p directory)
(chmod directory #o777))))))
+\f
+;;;
+;;; Enlightenment desktop service.
+;;;
+
+(define-record-type* <enlightenment-desktop-configuration>
+ enlightenment-desktop-configuration make-enlightenment-desktop-configuration
+ enlightenment-desktop-configuration?
+ ;; <package>
+ (enlightenment enlightenment-package
+ (default enlightenment)))
+
+(define (enlightenment-setuid-programs enlightenment-desktop-configuration)
+ (match-record enlightenment-desktop-configuration
+ <enlightenment-desktop-configuration>
+ (enlightenment)
+ (list (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_sys")
+ (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_backlight")
+ ;; TODO: Move this binary to a screen-locker service.
+ (file-append enlightenment
+ "/lib/enlightenment/utils/enlightenment_ckpasswd")
+ (file-append enlightenment
+ (string-append
+ "/lib/enlightenment/modules/cpufreq/"
+ (match (string-tokenize (%current-system)
+ (char-set-complement (char-set #\-)))
+ ((arch "linux") (string-append "linux-gnu-" arch))
+ ((arch "gnu") (string-append "gnu-" arch)))
+ "-"
+ (version-major+minor (package-version enlightenment))
+ "/freqset")))))
+
+(define enlightenment-desktop-service-type
+ (service-type
+ (name 'enlightenment-desktop)
+ (extensions
+ (list (service-extension dbus-root-service-type
+ (compose list
+ (package-direct-input-selector
+ "efl")
+ enlightenment-package))
+ (service-extension setuid-program-service-type
+ enlightenment-setuid-programs)
+ (service-extension profile-service-type
+ (compose list
+ enlightenment-package))))
+ (default-value (enlightenment-desktop-configuration))
+ (description
+ "Return a service that adds the @code{enlightenment} package to the system
+profile, and extends dbus with the ability for @code{efl} to generate
+thumbnails and makes setuid the programs which enlightenment needs to function
+as expected.")))
\f
;;;