aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMathieu Othacehe <othacehe@gnu.org>2022-01-03 20:22:02 +0100
committerMathieu Othacehe <othacehe@gnu.org>2022-01-06 09:26:39 +0100
commitcd4092b7a32c810d5396d48b61e87cf8863521f7 (patch)
tree723fa7639e5f72ec0ed5bafc24ec21d1e4b33fee
parent2e691011bf1ca3657d9152773167ffefd9eaf114 (diff)
downloadguix-cd4092b7a32c810d5396d48b61e87cf8863521f7.tar
guix-cd4092b7a32c810d5396d48b61e87cf8863521f7.tar.gz
services: gnome: Add udev rules.
Fixes: <https://issues.guix.gnu.org/32166>. * 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.
-rw-r--r--gnu/services/desktop.scm28
1 files 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