diff options
author | jdlugosz963 <jdlugosz963@gmail.com> | 2023-07-05 13:59:28 +0200 |
---|---|---|
committer | jdlugosz963 <jdlugosz963@gmail.com> | 2023-07-05 13:59:28 +0200 |
commit | d85086ed10809cf9864ed0321285d31c0b1f93f0 (patch) | |
tree | 773b7336100281f9f1e1902a4d7006d2731e114e /guix/jd/services/polkit.scm | |
parent | 49e0dc10749a34f66a0935c1ded8f6fa6c4b346c (diff) | |
download | dotfiles-d85086ed10809cf9864ed0321285d31c0b1f93f0.tar.gz dotfiles-d85086ed10809cf9864ed0321285d31c0b1f93f0.zip |
Add polkit rules and home services to my guix config.
Diffstat (limited to 'guix/jd/services/polkit.scm')
-rw-r--r-- | guix/jd/services/polkit.scm | 21 |
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))) | ||