diff options
| author | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-01-25 23:31:21 +0900 |
|---|---|---|
| committer | Maxim Cournoyer <maxim.cournoyer@gmail.com> | 2025-01-27 02:03:03 +0900 |
| commit | dc7f2cd9d8acc8e977f7e5c2b6ed3bac8ae0cbb5 (patch) | |
| tree | 4dbc14342155f350d1973ca214f3671cf921cb47 /gnu/services/desktop.scm | |
| parent | f9e13323498627218a9aafdc720abfa8c7122ea0 (diff) | |
services/gnome: Reinstate auto-configuration for GNOME Boxes.
Previously to 4722496292 ("Remove gnome-boxes from default GNOME apps."), USB
redirection for GNOME Boxes had been working out-of-the-box. Reinstate the
extensions that made that possible, so that simply adding the gnome-boxes
package back to one of the gnome-desktop-configuration fields does the right
thing.
* gnu/services/desktop.scm (gnome-setuid-programs): New procedure.
(gnome-desktop-service-type) [privileged-program-service-type]: Use it as an
extension.
* gnu/packages/gnome.scm (gnome-boxes):
[inputs]: Move spice-gtk to...
[propagated-inputs]: ... here.
[description]: Document extra steps necessary to enable the USB redirection
feature.
Change-Id: If84e8a2e0c480ddd1d7cd294890fad1ae2a76987
Reviewed-by: Liliana Marie Prikler <liliana.prikler@gmail.com>
Diffstat (limited to 'gnu/services/desktop.scm')
| -rw-r--r-- | gnu/services/desktop.scm | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 8b17d8be43f..e5446561822 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -1610,6 +1610,28 @@ inputs using non-default outputs, they are returned as gexp-input objects." gnome-packages)) gnome-packages)) +(define (gnome-setuid-programs config) + "Return the list of setuid programs found within the packages specified in +CONFIG, a <gnome-desktop-configuration> object." + ;; spice-gtk provides polkit actions for USB redirection in GNOME Boxes; set + ;; its usb-acl-helper script setuid automatically when the gnome-boxes or + ;; spice-gtk packages are added to one of the gnome-desktop-configuration + ;; fields. + (let* ((gnome-packages (gnome-profile config #:transitive? #t)) + (spice-gtk (find (compose (cut string=? "spice-gtk" <>) + package-name + (match-lambda ;disregard potential output + ((? package? p) p) + ((? gexp-input? p) + (gexp-input-thing p)))) + gnome-packages)) + (files `(,@(if spice-gtk + (list (file-append + spice-gtk + "/libexec/spice-client-glib-usb-acl-helper")) + '())))) + (map file-like->setuid-program files))) + (define gnome-desktop-service-type (service-type (name 'gnome-desktop) @@ -1618,6 +1640,8 @@ inputs using non-default outputs, they are returned as gexp-input objects." gnome-udev-configuration-files) (service-extension polkit-service-type gnome-polkit-settings) + (service-extension privileged-program-service-type + gnome-setuid-programs) (service-extension profile-service-type gnome-profile))) (default-value (gnome-desktop-configuration)) |
