summaryrefslogtreecommitdiff
path: root/gnu/services/desktop.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/services/desktop.scm')
-rw-r--r--gnu/services/desktop.scm72
1 files changed, 70 insertions, 2 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm
index 517d5d3efe..1e8c02c02a 100644
--- a/gnu/services/desktop.scm
+++ b/gnu/services/desktop.scm
@@ -5,6 +5,8 @@
;;; 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>
+;;; Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -29,8 +31,10 @@
#:use-module (gnu services avahi)
#:use-module (gnu services xorg)
#:use-module (gnu services networking)
+ #: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)
@@ -44,9 +48,11 @@
#: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)
@@ -96,6 +102,10 @@
x11-socket-directory-service
+ enlightenment-desktop-configuration
+ enlightenment-desktop-configuration?
+ enlightenment-desktop-service-type
+
%desktop-services))
;;; Commentary:
@@ -819,7 +829,8 @@ rules."
gnome-polkit-settings)
(service-extension profile-service-type
(compose list
- gnome-package))))))
+ gnome-package))))
+ (description "Run the GNOME desktop environment.")))
(define* (gnome-desktop-service #:key (config (gnome-desktop-configuration)))
"Return a service that adds the @code{gnome} package to the system profile,
@@ -845,7 +856,8 @@ and extends polkit with the actions from @code{gnome-settings-daemon}."
mate-package))
(service-extension profile-service-type
(compose list
- mate-package))))))
+ mate-package))))
+ (description "Run the MATE desktop environment.")))
(define* (mate-desktop-service #:key (config (mate-desktop-configuration)))
"Return a service that adds the @code{mate} package to the system profile,
@@ -899,6 +911,60 @@ with the administrator's password."
(let ((directory "/tmp/.X11-unix"))
(mkdir-p directory)
(chmod directory #o777))))))
+
+;;;
+;;; 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.")))
;;;
@@ -934,6 +1000,8 @@ with the administrator's password."
x11-socket-directory-service
+ (service alsa-service-type)
+
%base-services))
;;; desktop.scm ends here