summaryrefslogtreecommitdiffstats
path: root/guix/jd/services/polkit.scm
diff options
context:
space:
mode:
Diffstat (limited to 'guix/jd/services/polkit.scm')
-rw-r--r--guix/jd/services/polkit.scm21
1 files changed, 21 insertions, 0 deletions
diff --git a/guix/jd/services/polkit.scm b/guix/jd/services/polkit.scm
new file mode 100644
index 0000000..948500c
--- /dev/null
+++ b/guix/jd/services/polkit.scm
@@ -0,0 +1,21 @@
1(define-module (jd services polkit)
2 #:use-module (gnu services)
3 #:use-module (gnu services dbus)
4 #:use-module (gnu home services)
5 #:use-module (guix gexp))
6
7(define polkit-network-manager
8 (file-union
9 "polkit-wheel"
10 `(("share/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules"
11 ,(plain-file
12 "50-org.freedesktop.NetworkManager.rules"
13 "polkit.addRule(function(action, subject) {
14 if (action.id.indexOf(\"org.freedesktop.NetworkManager.\") == 0 &&
15 subject.isInGroup(\"netdev\")) {
16 return polkit.Result.YES;
17 }
18});")))))
19
20(define-public polkit-network-manager-service
21 (simple-service 'polkit-network-manager polkit-service-type (list polkit-network-manager)))