From: wolf <wolf@wolfsden.cz>
To: Csepp <raingloom@riseup.net>
Cc: TakeV <takev@disroot.org>, help-guix@gnu.org
Subject: Re: Serializing service config to YAML
Date: Thu, 27 Jul 2023 17:16:35 +0200 [thread overview]
Message-ID: <ZMKKU-Qqye8icZ-0@ws> (raw)
In-Reply-To: <87sf9a9twv.fsf@riseup.net>
[-- 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 --]
next prev parent reply other threads:[~2023-07-27 15:22 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-24 5:34 Serializing service config to YAML TakeV
2023-07-26 22:37 ` Csepp
2023-07-27 15:16 ` wolf [this message]
2023-07-26 22:56 ` Miguel Ángel Moreno
2023-07-26 23:58 ` takev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=ZMKKU-Qqye8icZ-0@ws \
--to=wolf@wolfsden.cz \
--cc=help-guix@gnu.org \
--cc=raingloom@riseup.net \
--cc=takev@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.