services: gnome: Register more polkit actions.

This should allow more operations such as changing the system date and
time via the Control Center (reported at
<https://lists.gnu.org/archive/html/help-guix/2016-09/msg00059.html>),
performing "file operations" via gvfs, and interacting with processes
using the System Monitor.

* gnu/services/desktop.scm (gnome-polkit-settings): New procedure.
(gnome-desktop-service-type): Use it in POLKIT-SERVICE-TYPE extension.
This commit is contained in:
Ludovic Courtès 2017-10-11 22:21:50 +02:00
parent 22345a8ed7
commit b27ce4164a
No known key found for this signature in database
GPG key ID: 090B11993D9AEBB5

View file

@ -780,15 +780,23 @@ (define-record-type* <gnome-desktop-configuration> gnome-desktop-configuration
gnome-desktop-configuration
(gnome-package gnome-package (default gnome)))
(define (gnome-polkit-settings config)
"Return the list of GNOME dependencies that provide polkit actions and
rules."
(let ((gnome (gnome-package config)))
(map (lambda (name)
((package-direct-input-selector name) gnome))
'("gnome-settings-daemon"
"gnome-control-center"
"gnome-system-monitor"
"gvfs"))))
(define gnome-desktop-service-type
(service-type
(name 'gnome-desktop)
(extensions
(list (service-extension polkit-service-type
(compose list
(package-direct-input-selector
"gnome-settings-daemon")
gnome-package))
gnome-polkit-settings)
(service-extension profile-service-type
(compose list
gnome-package))))))