services: Add polkit-wheel-service.
* 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 <ludo@gnu.org>
This commit is contained in:
parent
99c45877a9
commit
7f25ff10e1
2 changed files with 28 additions and 0 deletions
|
@ -15591,6 +15591,13 @@ capabilities to ordinary users. For example, an ordinary user can be granted
|
||||||
the capability to suspend the system if the user is logged in locally.
|
the capability to suspend the system if the user is logged in locally.
|
||||||
@end deffn
|
@end deffn
|
||||||
|
|
||||||
|
@defvr {Scheme Variable} polkit-wheel-service
|
||||||
|
Service that adds the @code{wheel} group as admins to the Polkit
|
||||||
|
service. This makes it so that users in the @code{wheel} group are queried
|
||||||
|
for their own passwords when performing administrative actions instead of
|
||||||
|
@code{root}'s, similar to the behaviour used by @code{sudo}.
|
||||||
|
@end defvr
|
||||||
|
|
||||||
@defvr {Scheme Variable} upower-service-type
|
@defvr {Scheme Variable} upower-service-type
|
||||||
Service that runs @uref{https://upower.freedesktop.org/, @command{upowerd}}, a
|
Service that runs @uref{https://upower.freedesktop.org/, @command{upowerd}}, a
|
||||||
system-wide monitor for power consumption and battery levels, with the given
|
system-wide monitor for power consumption and battery levels, with the given
|
||||||
|
|
|
@ -135,6 +135,8 @@
|
||||||
inputattach-configuration?
|
inputattach-configuration?
|
||||||
inputattach-service-type
|
inputattach-service-type
|
||||||
|
|
||||||
|
polkit-wheel-service
|
||||||
|
|
||||||
%desktop-services))
|
%desktop-services))
|
||||||
|
|
||||||
;;; Commentary:
|
;;; Commentary:
|
||||||
|
@ -1064,6 +1066,25 @@ as expected.")))
|
||||||
(description "Return a service that runs inputattach on a device and
|
(description "Return a service that runs inputattach on a device and
|
||||||
dispatches events from it.")))
|
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.
|
;;; The default set of desktop services.
|
||||||
|
|
Reference in a new issue