Message ID | 87v8pwg1n7.fsf@trop.in |
---|---|
State | Accepted |
Headers | show |
Series | [bug#57692] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME. | expand |
Context | Check | Description |
---|---|---|
cbaines/comparison | success | View comparision |
cbaines/git-branch | success | View Git branch |
cbaines/applying patch | success | View Laminar job |
cbaines/issue | success | View issue |
Am Freitag, dem 09.09.2022 um 15:42 +0300 schrieb Andrew Tropin: > > * gnu/home/services/shepherd.scm: Add shepherd/init.scm to > XDG_CONFIG_HOME. Should be * gnu/home/services/shepherd.scm (add-shepherd-configuration): New variable. (home-shepherd-service-type)[extensions]: Add home-xdg-configuration- files-service-type. Note that I'm less sure on the second entry here, you might have to refer to add-shepherd-configuration. I'd personally prefer "shepherd-configuration-files" as a name for the procedure or "shepherd-xdg-configuration-files" if we're super strict. Other than that LGTM. Cheers
On 2022-09-09 17:15, Liliana Marie Prikler wrote: > Am Freitag, dem 09.09.2022 um 15:42 +0300 schrieb Andrew Tropin: >> >> * gnu/home/services/shepherd.scm: Add shepherd/init.scm to >> XDG_CONFIG_HOME. > Should be > > * gnu/home/services/shepherd.scm (add-shepherd-configuration): New > variable. > (home-shepherd-service-type)[extensions]: Add home-xdg-configuration- > files-service-type. Right, will adjust it, thank you! > > Note that I'm less sure on the second entry here, you might have to > refer to add-shepherd-configuration. > > I'd personally prefer "shepherd-configuration-files" as a name for the > procedure or "shepherd-xdg-configuration-files" if we're super strict. Sounds good. > > Other than that LGTM. > > Cheers >
diff --git a/gnu/home/services/shepherd.scm b/gnu/home/services/shepherd.scm index 62ab0aadc6..c17ec2b0f5 100644 --- a/gnu/home/services/shepherd.scm +++ b/gnu/home/services/shepherd.scm @@ -130,12 +130,21 @@ (define (ensure-shepherd-gexp config) #$(reload-configuration-gexp config) #$(launch-shepherd-gexp config))) +(define (add-shepherd-configuration config) + (let* ((shepherd (home-shepherd-configuration-shepherd config)) + (services (home-shepherd-configuration-services config))) + `(("shepherd/init.scm" + ,(home-shepherd-configuration-file services shepherd))))) + (define-public home-shepherd-service-type (service-type (name 'home-shepherd) (extensions (list (service-extension home-run-on-first-login-service-type launch-shepherd-gexp) + (service-extension + home-xdg-configuration-files-service-type + add-shepherd-configuration) (service-extension home-activation-service-type ensure-shepherd-gexp)