all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Serializing service config to YAML
@ 2023-07-24  5:34 TakeV
  2023-07-26 22:37 ` Csepp
  2023-07-26 22:56 ` Miguel Ángel Moreno
  0 siblings, 2 replies; 5+ messages in thread
From: TakeV @ 2023-07-24  5:34 UTC (permalink / raw)
  To: help-guix


[-- Attachment #1.1.1: Type: text/plain, Size: 521 bytes --]

Hello there!

I am attempting to create a service to run a package (specifically this 
https://github.com/superseriousbusiness/gotosocial) via shepherd. I have 
the config defined as specified in the complex configuration part of the 
manual, and I was wondering if there are any existing examples of 
serializing configurations to YAML? Right now I have everything passing 
directly into the command line, and being able to serialize to a config 
and pass that in would be much cleaner, I believe.

Thanks!


[-- Attachment #1.1.2: OpenPGP public key --]
[-- Type: application/pgp-keys, Size: 5289 bytes --]

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 665 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serializing service config to YAML
  2023-07-24  5:34 Serializing service config to YAML TakeV
@ 2023-07-26 22:37 ` Csepp
  2023-07-27 15:16   ` wolf
  2023-07-26 22:56 ` Miguel Ángel Moreno
  1 sibling, 1 reply; 5+ messages in thread
From: Csepp @ 2023-07-26 22:37 UTC (permalink / raw)
  To: TakeV; +Cc: help-guix


TakeV <takev@disroot.org> writes:

> [[PGP Signed Part:Undecided]]
> Hello there!
>
> I am attempting to create a service to run a package (specifically
> this https://github.com/superseriousbusiness/gotosocial) via shepherd.
> I have the config defined as specified in the complex configuration
> part of the manual, and I was wondering if there are any existing
> examples of serializing configurations to YAML? Right now I have
> everything passing directly into the command line, and being able to
> serialize to a config and pass that in would be much cleaner, I
> believe.
>
> Thanks!
>
> [2. OpenPGP public key --- application/pgp-keys; OpenPGP_0x640A6795ECDAAC2F.asc]...
>
> [[End of PGP Signed Part]]

Grepping through the source code didn't reveal any meaningful references
to yaml.
There is an ad-hoc config generator in gnu/services/web.scm that
generates a tailon-config.yml, but at a quick glance it doesn't seem to
be a generic converter.  But maybe it's a good starting point?
I checked guile-libyaml but it is only a parser and doesn't support
serializing Scheme into YAML as far as I can tell.


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serializing service config to YAML
  2023-07-24  5:34 Serializing service config to YAML TakeV
  2023-07-26 22:37 ` Csepp
@ 2023-07-26 22:56 ` Miguel Ángel Moreno
  2023-07-26 23:58   ` takev
  1 sibling, 1 reply; 5+ messages in thread
From: Miguel Ángel Moreno @ 2023-07-26 22:56 UTC (permalink / raw)
  To: help-guix

Hi,

We at RDE have custom serializers for various document formats that upstream doesn't seem to entirely agree on.  I've recently proposed a YAML serializer in here https://lists.sr.ht/~abcdw/rde-devel/%3Ccover.1678531169.git.contact%40conses.eu%3E that should be merged in pretty soon. Hope it helps.

On July 24, 2023 7:34:00 AM GMT+02:00, TakeV <takev@disroot.org> wrote:
>Hello there!
>
>I am attempting to create a service to run a package (specifically this https://github.com/superseriousbusiness/gotosocial) via shepherd. I have the config defined as specified in the complex configuration part of the manual, and I was wondering if there are any existing examples of serializing configurations to YAML? Right now I have everything passing directly into the command line, and being able to serialize to a config and pass that in would be much cleaner, I believe.
>
>Thanks!
>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serializing service config to YAML
  2023-07-26 22:56 ` Miguel Ángel Moreno
@ 2023-07-26 23:58   ` takev
  0 siblings, 0 replies; 5+ messages in thread
From: takev @ 2023-07-26 23:58 UTC (permalink / raw)
  To: help-guix

This is absolutely perfect! Thank you for the link.

On 7/26/23 3:56 PM, Miguel Ángel Moreno <mail@migalmoreno.com> wrote:
> Hi,
> 
> We at RDE have custom serializers for various document formats that upstream doesn't seem to entirely agree on.  I've recently proposed a YAML serializer in here https://lists.sr.ht/~abcdw/rde-devel/%3Ccover.1678531169.git.contact%40conses.eu%3E that should be merged in pretty soon. Hope it helps.
> 
> On July 24, 2023 7:34:00 AM GMT+02:00, TakeV <takev@disroot.org> wrote:
> > Hello there!
> >
> > I am attempting to create a service to run a package (specifically this https://github.com/superseriousbusiness/gotosocial) via shepherd. I have the config defined as specified in the complex configuration part of the manual, and I was wondering if there are any existing examples of serializing configurations to YAML? Right now I have everything passing directly into the command line, and being able to serialize to a config and pass that in would be much cleaner, I believe.
> >
> > Thanks!
> >
> 
> 


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Serializing service config to YAML
  2023-07-26 22:37 ` Csepp
@ 2023-07-27 15:16   ` wolf
  0 siblings, 0 replies; 5+ messages in thread
From: wolf @ 2023-07-27 15:16 UTC (permalink / raw)
  To: Csepp; +Cc: TakeV, help-guix

[-- Attachment #1: Type: text/plain, Size: 1522 bytes --]

On 2023-07-27 00:37:14 +0200, Csepp wrote:
> 
> TakeV <takev@disroot.org> writes:
> 
> > [[PGP Signed Part:Undecided]]
> > Hello there!
> >
> > I am attempting to create a service to run a package (specifically
> > this https://github.com/superseriousbusiness/gotosocial) via shepherd.
> > I have the config defined as specified in the complex configuration
> > part of the manual, and I was wondering if there are any existing
> > examples of serializing configurations to YAML? Right now I have
> > everything passing directly into the command line, and being able to
> > serialize to a config and pass that in would be much cleaner, I
> > believe.
> >
> > Thanks!
> >
> > [2. OpenPGP public key --- application/pgp-keys; OpenPGP_0x640A6795ECDAAC2F.asc]...
> >
> > [[End of PGP Signed Part]]
> 
> Grepping through the source code didn't reveal any meaningful references
> to yaml.
> There is an ad-hoc config generator in gnu/services/web.scm that
> generates a tailon-config.yml, but at a quick glance it doesn't seem to
> be a generic converter.  But maybe it's a good starting point?
> I checked guile-libyaml but it is only a parser and doesn't support
> serializing Scheme into YAML as far as I can tell.
>

You can always just cheat a bit by using the fact that pretty much any JSON is a
valid YAML.  So just serialize to that and name the file .yaml.  ^_^

W.

-- 
There are only two hard things in Computer Science:
cache invalidation, naming things and off-by-one errors.

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2023-07-29  1:21 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-07-24  5:34 Serializing service config to YAML TakeV
2023-07-26 22:37 ` Csepp
2023-07-27 15:16   ` wolf
2023-07-26 22:56 ` Miguel Ángel Moreno
2023-07-26 23:58   ` takev

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.