diff options
Diffstat (limited to 'gnu/services')
-rw-r--r-- | gnu/services/cuirass.scm | 4 | ||||
-rw-r--r-- | gnu/services/dbus.scm | 10 | ||||
-rw-r--r-- | gnu/services/desktop.scm | 22 | ||||
-rw-r--r-- | gnu/services/sysctl.scm | 2 |
4 files changed, 33 insertions, 5 deletions
diff --git a/gnu/services/cuirass.scm b/gnu/services/cuirass.scm index 88a9a86111..d27a2bbc44 100644 --- a/gnu/services/cuirass.scm +++ b/gnu/services/cuirass.scm @@ -66,6 +66,8 @@ (default #f)) (one-shot? cuirass-configuration-one-shot? ;boolean (default #f)) + (fallback? cuirass-configuration-fallback? ;boolean + (default #f)) (load-path cuirass-configuration-load-path (default '()))) @@ -84,6 +86,7 @@ (specs (cuirass-configuration-specifications config)) (use-substitutes? (cuirass-configuration-use-substitutes? config)) (one-shot? (cuirass-configuration-one-shot? config)) + (fallback? (cuirass-configuration-fallback? config)) (load-path (cuirass-configuration-load-path config))) (list (shepherd-service (documentation "Run Cuirass.") @@ -99,6 +102,7 @@ "--interval" #$(number->string interval) #$@(if use-substitutes? '("--use-substitutes") '()) #$@(if one-shot? '("--one-shot") '()) + #$@(if fallback? '("--fallback") '()) #$@(if (null? load-path) '() `("--load-path" ,(string-join load-path ":")))) #:user #$user diff --git a/gnu/services/dbus.scm b/gnu/services/dbus.scm index 26390a4acd..360a8af9ab 100644 --- a/gnu/services/dbus.scm +++ b/gnu/services/dbus.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> ;;; ;;; This file is part of GNU Guix. @@ -205,7 +205,9 @@ includes the @code{etc/dbus-1/system.d} directories of each package listed in (inherit config) (services (append (dbus-configuration-services config) - services))))))) + services))))) + + (default-value (dbus-configuration)))) (define* (dbus-service #:key (dbus dbus) (services '())) "Return a service that runs the \"system bus\", using @var{dbus}, with @@ -297,7 +299,9 @@ and policy files. For example, to allow avahi-daemon to use the system bus, (inherit config) (actions (append (polkit-configuration-actions config) - actions))))))) + actions))))) + + (default-value (polkit-configuration)))) (define* (polkit-service #:key (polkit polkit)) "Return a service that runs the diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 36049587d3..50a561bf51 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2014, 2015, 2016, 2017 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2015 Andy Wingo <wingo@igalia.com> ;;; Copyright © 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2016 Sou Bunnbu <iyzsong@gmail.com> @@ -653,6 +653,20 @@ seats.)" (inherit pam) (session (cons pam-elogind (pam-service-session pam))))))) +(define (elogind-shepherd-service config) + "Return a Shepherd service to start elogind according to @var{config}." + (list (shepherd-service + (requirement '(dbus-system)) + (provision '(elogind)) + (start #~(make-forkexec-constructor + (list #$(file-append (elogind-package config) + "/libexec/elogind/elogind")) + #:environment-variables + (list (string-append "ELOGIND_CONF_FILE=" + #$(elogind-configuration-file + config))))) + (stop #~(make-kill-destructor))))) + (define elogind-service-type (service-type (name 'elogind) (extensions @@ -663,6 +677,12 @@ seats.)" (service-extension polkit-service-type (compose list elogind-package)) + ;; Start elogind from the Shepherd rather than waiting + ;; for bus activation. This ensures that it can handle + ;; events like lid close, etc. + (service-extension shepherd-root-service-type + elogind-shepherd-service) + ;; Provide the 'loginctl' command. (service-extension profile-service-type (compose list elogind-package)) diff --git a/gnu/services/sysctl.scm b/gnu/services/sysctl.scm index be5be59a05..5e9e6f0661 100644 --- a/gnu/services/sysctl.scm +++ b/gnu/services/sysctl.scm @@ -33,7 +33,7 @@ ;;; (define-record-type* <sysctl-configuration> - sysctl-configuration make-sysctl-configuration? + sysctl-configuration make-sysctl-configuration sysctl-configuration? (sysctl sysctl-configuration-sysctl ; path of the 'sysctl' command (default (file-append procps "/sbin/sysctl"))) |