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/home-services/polkit.scm | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 guix/jd/home-services/polkit.scm (limited to 'guix/jd/home-services/polkit.scm') diff --git a/guix/jd/home-services/polkit.scm b/guix/jd/home-services/polkit.scm new file mode 100644 index 0000000..699f2da --- /dev/null +++ b/guix/jd/home-services/polkit.scm @@ -0,0 +1,31 @@ +(define-module (jd home-services polkit) + #:use-module (gnu packages) + #:use-module (gnu packages polkit) + #:use-module (gnu services) + #:use-module (gnu services configuration) + #:use-module (gnu home services) + #:use-module (gnu home services shepherd) + #:use-module (guix gexp)) + + +(define (polkit-gnome-profile-service config) + (specifications->packages '("polkit-gnome"))) + +(define (polkit-gnome-shepherd-service config) + (list (shepherd-service + (documentation "Polkit gnome service.") + (provision '(polkit-gnome)) + (start #~(make-forkexec-constructor + (list #$(file-append polkit-gnome + "/libexec/polkit-gnome-authentication-agent-1")))) + (stop #~(make-kill-destructor))))) + +(define-public home-polkit-gnome-service-type + (service-type (name 'home-polkit-gnome) + (extensions (list (service-extension home-profile-service-type + polkit-gnome-profile-service) + (service-extension home-shepherd-service-type + polkit-gnome-shepherd-service))) + (default-value #f) + (description "Runs the PolicyKit-gnome service."))) + -- cgit v1.2.3