From d85086ed10809cf9864ed0321285d31c0b1f93f0 Mon Sep 17 00:00:00 2001 From: jdlugosz963 Date: Wed, 5 Jul 2023 13:59:28 +0200 Subject: Add polkit rules and home services to my guix config. --- guix/jd/services/polkit.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 guix/jd/services/polkit.scm (limited to 'guix/jd/services') 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 @@ +(define-module (jd services polkit) + #:use-module (gnu services) + #:use-module (gnu services dbus) + #:use-module (gnu home services) + #:use-module (guix gexp)) + +(define polkit-network-manager + (file-union + "polkit-wheel" + `(("share/polkit-1/rules.d/50-org.freedesktop.NetworkManager.rules" + ,(plain-file + "50-org.freedesktop.NetworkManager.rules" + "polkit.addRule(function(action, subject) { + if (action.id.indexOf(\"org.freedesktop.NetworkManager.\") == 0 && + subject.isInGroup(\"netdev\")) { + return polkit.Result.YES; + } +});"))))) + +(define-public polkit-network-manager-service + (simple-service 'polkit-network-manager polkit-service-type (list polkit-network-manager))) -- cgit v1.2.3