[PATCH] home: shepherd: Add shepherd/init.scm to XDG_CONFIG_HOME.

  • Done
  • quality assurance status badge
Details
2 participants
  • Andrew Tropin
  • Liliana Marie Prikler
Owner
unassigned
Submitted by
Andrew Tropin
Severity
normal

Debbugs page

Andrew Tropin wrote 3 years ago
(address . guix-patches@gnu.org)(name . Ludovic Courtès)(address . ludo@gnu.org)
87v8pwg1n7.fsf@trop.in
* 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(+)

Toggle diff (28 lines)
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
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMbNKwACgkQIgjSCVjB
3rCsPg/9FiGGfKz5nv+SS68Fp/BQy4O7NwhlqRk1RBlOC5VozBsokSpBOFoOMll6
ehNYuUBMms1Z/zQswRQ9nVDe86FMFZNY46IRvso8ibRAJOONvOhlmCdvt34A2pIM
rLzql36xkEinPs1JV82AoMtNfVbc8SKdm9E/RSmGkFRRSSXKth1NWKOFtKXCva1Q
l+RZTsrd65IBqyP5scdUTZak0eJXEYHX+xMiMlAP/7G6GLNLOMnEnqz8WEidE2nK
7rlZzaFqwm9/YVyeYV5SmBmhjh6eFayV4sMAcc5FcxhTrGfYdpwKrpfOOvcpWyfP
0rH2EAb/0JVSNwRmb/xmVwP4it01rMeTU/sw3DCVp2VnZ4lY9SjJk/dTdcisPXPY
Y1XyaIL5cQGXW/Zpro9LsMaluL2/08cF5iMpcj/vT/UcQS/zlQho31a8B/9mX7GF
8MZSUhFF9oWgKd9WRNGr3WNcnkf84Mi3DlWf+ox7epgKAp9dJ/GblgnQwIA7tRc9
wt5T54MqFCmhCqevAMzyHnwtTF94VNWuL87nebC6zdn2dmY3i7UQf2oEVvv+Dyns
JQ6fdVga3ZaKnu388ypYOxzXtptZbXXNP7Dhdh3t7Sy1OKc+SVzwa4w7VrDbTjIA
KirdmtrEPOZr4KwY6vir5tgTTOy63afU63ADRVi6AE/FoLuCD7E=
=ZLVy
-----END PGP SIGNATURE-----

Liliana Marie Prikler wrote 3 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
0c513905839001189bb9502769be0b81f25166bf.camel@gmail.com
Am Freitag, dem 09.09.2022 um 15:42 +0300 schrieb Andrew Tropin:
Toggle quote (3 lines)
>
> * 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
Andrew Tropin wrote 3 years ago
(name . Ludovic Courtès)(address . ludo@gnu.org)
875yhw9wuf.fsf@trop.in
On 2022-09-09 17:15, Liliana Marie Prikler wrote:

Toggle quote (11 lines)
> 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!

Toggle quote (7 lines)
>
> 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.

Toggle quote (6 lines)
>
> Other than that LGTM.
>
> Cheers
>

--
Best regards,
Andrew Tropin
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMbkngACgkQIgjSCVjB
3rCEBw/8DXifE+GtkgFo5qSoE4thsFJXqnZXLtogJqrKKvSLdc6MAdPiz9MVGOD8
zPFz0PC+orea8Za91sbBjDulLaxOLUff/Ed/Fl2t1DJHhjiqqlIzPwLT28lHC3cZ
PEay7h7ae5NKucFdmkC9Uwj/QQ8zIJUq49HSAhTQVdZ9B1g2D90I6zOxqCfhKupK
BchfXbjks3dK7yVTEaIxwQEnq/211OyChzIrNZLCm//cEdNHHv3J23ou8lKnckku
Ytc771RtrO8OJNyzustnf7RMr8oJ3MPmXj6WB6QFY5+rV5gLuB27dWfSRo1VxP+R
2iDfoPxqoTccQg98Hz4jzh59KzYoDLNnusYnX1BK3EQK7WPnQwXH+YBQDzV5Oaeg
n3aBOOikEzTuaMW/zfdrzFLH24gFYcoTj8nQNG8VSK+LwI1oZfqa2O2TZvvQBW/H
6wPpD35e4F/6XN+imC8qQUmwDyczB9rXeqKPMduLmTxlEIrZjh2fJDRbLdx9U/tQ
hGeOh5psEMVoBr5Z0X9VivWvTK0wFvQM354QlklY9VzXUv0pXlsDrP2BKenJnI6/
zJc16XB6xvnsT+od1EXlB1ncAmZ1cfB+lYQ4ZtHhwbZLOcFtoj8etqvUKTTdZ5TA
Tff0PJKAyG+SX/sFNtpm/xmLBR2lfH87Eg+CBYoD87H7nYo9ShM=
=m9xE
-----END PGP SIGNATURE-----

Andrew Tropin wrote 2 years ago
Applied
(address . control@debbugs.gnu.org)
875yhrkcw0.fsf@trop.in
close 57692
-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmMgIr8ACgkQIgjSCVjB
3rBjLQ//ZfE0L1ccgzuArEF6umnxKyyk71AfvPQLJyxb3MIN4GhLQqhsCJP2705d
smJ/TmNGtXVrmaHA13AI+ZRjyd7t99VSiVI2jA2NZwxOYZiQIRZzfzUL6nxhiACg
cJf1K4mDZ5fgrvfYftywhBoiBPcAjuLQxeeJwGcZXu+q1A9F9IWQYKfqI4F1t6MX
7x3+GoXSzutHUJl8UPGoyBbXN+7JvlQykLbFdxbGp2xIYma+lvOE8KfVinSsqYSX
R1QuLYE7Vh5nWeEtFf5e6ZS8rt7Z4rsThKyFkJkQE6Xc+p8iPuoASm2hfsXr42T2
XE+9PYPd17JSgDcT6f1TBegIoGyA33qG02LoZ32V9WkSnruZC2p4pg/IvFUwLZEh
+gULdI4px5LaZLQm2DfdqntdhLK0AoYW2ePG8V9DvEPk4W9q6AqLb4xnzKQTGc1u
PnTk1BUgBb4wI1oTJk2fl1gSOdkO2fZ0NzdyE2Olv6J4aKan/9lfzMzQe/oOvDw9
WQyqLcrTuJr7lmg9K7AWGIGDHUdy8dghO+H/r8B3YbtYutW95ro0mDNuxDhYA2dx
bFIzk50+no/ceYbdH577Wj9EdOyeJNBxtKn9xhQwzOmLr3t7JZ0Xc08TCr9QeFcT
p6Ba6HSqzTmpBTioCIoN5fS8pvoHKbYRKiWNlrZ53zDCv6Q+OdE=
=6A0o
-----END PGP SIGNATURE-----

?
Your comment

This issue is archived.

To comment on this conversation send an email to 57692@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 57692
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch
You may also tag this issue. See list of standard tags. For example, to set the confirmed and easy tags
mumi command -t +confirmed -t +easy
Or, remove the moreinfo tag and set the help tag
mumi command -t -moreinfo -t +help