From 7f25ff10e1c821da84c641e7f6c01c34a2ebe12e Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Sat, 23 Nov 2019 19:51:15 +0100 Subject: services: Add polkit-wheel-service. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/services/desktop.scm: (polkit-wheel): New variable. (polkit-wheel-service): New service. * doc/guix.texi: Document polkit-wheel-service. Signed-off-by: Ludovic Courtès --- gnu/services/desktop.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) (limited to 'gnu/services/desktop.scm') diff --git a/gnu/services/desktop.scm b/gnu/services/desktop.scm index 0152e86e8a..9eee2fa485 100644 --- a/gnu/services/desktop.scm +++ b/gnu/services/desktop.scm @@ -135,6 +135,8 @@ (define-module (gnu services desktop) inputattach-configuration? inputattach-service-type + polkit-wheel-service + %desktop-services)) ;;; Commentary: @@ -1064,6 +1066,25 @@ (define inputattach-service-type (description "Return a service that runs inputattach on a device and dispatches events from it."))) + +;;; +;;; polkit-wheel-service -- Allow wheel group to perform admin actions +;;; + +(define polkit-wheel + (file-union + "polkit-wheel" + `(("share/polkit-1/rules.d/wheel.rules" + ,(plain-file + "wheel.rules" + "polkit.addAdminRule(function(action, subject) { + return [\"unix-group:wheel\"]; +}); +"))))) + +(define polkit-wheel-service + (simple-service 'polkit-wheel polkit-service-type (list polkit-wheel))) + ;;; ;;; The default set of desktop services. -- cgit v1.2.3