GNU bug report logs - #57692
[PATCH] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.

Previous Next

Package: guix-patches;

Reported by: Andrew Tropin <andrew <at> trop.in>

Date: Fri, 9 Sep 2022 12:43:02 UTC

Severity: normal

Tags: patch

Done: Andrew Tropin <andrew <at> trop.in>

Bug is archived. No further changes may be made.

To add a comment to this bug, you must first unarchive it, by sending
a message to control AT debbugs.gnu.org, with unarchive 57692 in the body.
You can then email your comments to 57692 AT debbugs.gnu.org in the normal way.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to guix-patches <at> gnu.org:
bug#57692; Package guix-patches. (Fri, 09 Sep 2022 12:43:02 GMT) Full text and rfc822 format available.

Acknowledgement sent to Andrew Tropin <andrew <at> trop.in>:
New bug report received and forwarded. Copy sent to guix-patches <at> gnu.org. (Fri, 09 Sep 2022 12:43:02 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: guix-patches <at> gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: [PATCH] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.
Date: Fri, 09 Sep 2022 15:42:20 +0300
[Message part 1 (text/plain, inline)]
* gnu/home/services/shepherd.scm: Add shepherd/init.scm to XDG_CONFIG_HOME.
---
Without this change it's not possible to start shepherd manually.  Even
if we disable extension of home-run-on-first-login-service-type via
(home-shepherd-configuration-auto-start? #f), we don't know what
shepherd configuration file to specify to shepherd --config.

 gnu/home/services/shepherd.scm | 9 +++++++++
 1 file changed, 9 insertions(+)

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)
-- 
2.37.3
[signature.asc (application/pgp-signature, inline)]

Information forwarded to guix-patches <at> gnu.org:
bug#57692; Package guix-patches. (Fri, 09 Sep 2022 15:17:02 GMT) Full text and rfc822 format available.

Message #8 received at 57692 <at> debbugs.gnu.org (full text, mbox):

From: Liliana Marie Prikler <liliana.prikler <at> gmail.com>
To: Andrew Tropin <andrew <at> trop.in>, 57692 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [PATCH] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.
Date: Fri, 09 Sep 2022 17:15:52 +0200
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





Information forwarded to guix-patches <at> gnu.org:
bug#57692; Package guix-patches. (Fri, 09 Sep 2022 19:23:02 GMT) Full text and rfc822 format available.

Message #11 received at 57692 <at> debbugs.gnu.org (full text, mbox):

From: Andrew Tropin <andrew <at> trop.in>
To: Liliana Marie Prikler <liliana.prikler <at> gmail.com>, 57692 <at> debbugs.gnu.org
Cc: Ludovic Courtès <ludo <at> gnu.org>
Subject: Re: [PATCH] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.
Date: Fri, 09 Sep 2022 22:22:32 +0300
[Message part 1 (text/plain, inline)]
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
>

-- 
Best regards,
Andrew Tropin
[signature.asc (application/pgp-signature, inline)]

bug closed, send any further explanations to 57692 <at> debbugs.gnu.org and Andrew Tropin <andrew <at> trop.in> Request was from Andrew Tropin <andrew <at> trop.in> to control <at> debbugs.gnu.org. (Tue, 13 Sep 2022 06:28:02 GMT) Full text and rfc822 format available.

bug archived. Request was from Debbugs Internal Request <help-debbugs <at> gnu.org> to internal_control <at> debbugs.gnu.org. (Tue, 11 Oct 2022 11:24:10 GMT) Full text and rfc822 format available.

This bug report was last modified 1 year and 194 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.