diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/cgit.scm | 17 | ||||
-rw-r--r-- | gnu/services/dbus.scm | 2 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 62 | ||||
-rw-r--r-- | gnu/services/networking.scm | 5 |
4 files changed, 83 insertions, 3 deletions
diff --git a/gnu/services/cgit.scm b/gnu/services/cgit.scm index 8ef12cd5a0..3289d37333 100644 --- a/gnu/services/cgit.scm +++ b/gnu/services/cgit.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Oleg Pykhalov <go.wigust@gmail.com> ;;; Copyright © 2018 Clément Lassieur <clement@lassieur.org> +;;; Copyright © 2018 Christopher Baines <mail@cbaines.net> ;;; ;;; This file is part of GNU Guix. ;;; @@ -115,6 +116,10 @@ (define (serialize-file-object field-name val) (serialize-string field-name val)) +(define (project-list? val) + (or (list? val) + (file-object? val))) + ;;; ;;; Serialize <nginx-server-configuration> @@ -167,7 +172,12 @@ (if (null? val) "" (serialize-field 'project-list - (plain-file "project-list" (string-join val "\n"))))) + (if (file-object? val) + val + (plain-file "project-list" (string-join val "\n")))))) + +(define (serialize-extra-options extra-options) + (string-join extra-options "\n" 'suffix)) (define repository-directory? string?) @@ -543,7 +553,7 @@ disabled.") "Flag which, when set to @samp{#t}, will make cgit omit the standard header on all pages.") (project-list - (list '()) + (project-list '()) "A list of subdirectories inside of @code{repository-directory}, relative to it, that should loaded as Git repositories. An empty list means that all subdirectories will be loaded.") @@ -641,6 +651,7 @@ for cgit to allow access to that repository.") (define (rest? field) (not (memq (configuration-field-name field) '(project-list + extra-options repository-directory repositories)))) #~(string-append @@ -649,6 +660,8 @@ for cgit to allow access to that repository.") #$(serialize-project-list 'project-list (cgit-configuration-project-list config)) + #$(serialize-extra-options + (cgit-configuration-extra-options config)) #$(serialize-repository-directory 'repository-directory (cgit-configuration-repository-directory config)) diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 360a8af9ab..1e24d93ccb 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -63,7 +63,7 @@ all the services that may be activated by the daemon." (find-files (string-append service - "/share/dbus-1/system-services") + "/share/dbus-1/") "\\.service$")) (list #$@services))) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 0dada82738..a9af7246f5 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -5,6 +5,7 @@ ;;; 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. ;;; @@ -32,6 +33,7 @@ #: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) @@ -45,9 +47,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) @@ -97,6 +101,10 @@ x11-socket-directory-service + enlightenment-desktop-configuration + enlightenment-desktop-configuration? + enlightenment-desktop-service-type + %desktop-services)) ;;; Commentary: @@ -900,6 +908,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."))) ;;; diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 0c9c69eef5..e4441f6475 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -464,6 +464,8 @@ make an initial adjustment of more than 1,000 seconds." openntpd-shepherd-service) (service-extension account-service-type (const %ntp-accounts)) + (service-extension profile-service-type + (compose list openntpd-configuration-openntpd)) (service-extension activation-service-type openntpd-service-activation))) (default-value (openntpd-configuration)) @@ -952,6 +954,8 @@ wireless networking.")))) (extensions (list (service-extension shepherd-root-service-type connman-shepherd-service) + (service-extension polkit-service-type + connman-package) (service-extension dbus-root-service-type connman-package) (service-extension activation-service-type @@ -959,6 +963,7 @@ wireless networking.")))) ;; Add connman to the system profile. (service-extension profile-service-type connman-package))) + (default-value (connman-configuration)) (description "Run @url{https://01.org/connman,Connman}, a network connection manager.")))) |