From cd4092b7a32c810d5396d48b61e87cf8863521f7 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Mon, 3 Jan 2022 20:22:02 +0100 Subject: services: gnome: Add udev rules. Fixes: . * gnu/services/desktop.scm (gnome-packages, gnome-udev-rules): New procedures. (gnome-polkit-settings): Use the gnome-packages procedure. (gnome-desktop-service-type): Add an udev service extension. --- gnu/services/desktop.scm | 28 ++++++++++++++++++++-------- 1 file changed, 20 insertions(+), 8 deletions(-) diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index c6761ca784..c2ee3a3d80 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -868,22 +868,34 @@ rules.") gnome-desktop-configuration? (gnome gnome-package (default gnome))) -(define (gnome-polkit-settings config) - "Return the list of GNOME dependencies that provide polkit actions and -rules." +(define (gnome-packages config packages) + "Return the list of GNOME dependencies from CONFIG which names are part of +the given PACKAGES list." (let ((gnome (gnome-package config))) (map (lambda (name) ((package-direct-input-selector name) gnome)) - '("gnome-settings-daemon" - "gnome-control-center" - "gnome-system-monitor" - "gvfs")))) + packages))) + +(define (gnome-udev-rules config) + "Return the list of GNOME dependencies that provide udev rules." + (gnome-packages config '("gnome-settings-daemon"))) + +(define (gnome-polkit-settings config) + "Return the list of GNOME dependencies that provide polkit actions and +rules." + (gnome-packages config + '("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 + (list (service-extension udev-service-type + gnome-udev-rules) + (service-extension polkit-service-type gnome-polkit-settings) (service-extension profile-service-type (compose list -- cgit 1.4.1