From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 2HZ/LMeLwmQHLAAASxT56A (envelope-from ) for ; Thu, 27 Jul 2023 17:22:47 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id aBGMLMeLwmRULAAA9RJhRA (envelope-from ) for ; Thu, 27 Jul 2023 17:22:47 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 66B7A5F6BC for ; Thu, 27 Jul 2023 17:22:09 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b="Tu1/+2Z8"; dkim=pass header.d=wolfsden.cz header.s=mail header.b=mwgLBW0b; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1690471329; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=dClJMI0jtPs5i/CeLHdoVPXqCNF+e5eZJLKcS4LH+E4=; b=AvWMTnuU2zyCRK5rN0tvJStqrujAhFCTZllqPaxx7XqxsbJmXDZb4aaiLo2CxIoJh8zrZl diqxmIBlPsTSuSXZT9GSlXDe1jbDbRbxlvXHoqpKtvdfyMW79qbOsbaw2AeDwujyfmJFVc ni873B+l8wiIHNweGwBxeU9X0+IKkFeIvx2tPedXtbCyHPZsCeP1iEbyf96eeGex/7U3HT EG58iKxbv6/1U+I5SycTjXVftKr2c3ukvW5L/OEuwqEii7ofB4Eqfl6fCDLbWKbQERD6lz LM23jreL7ItJwcFqiEt+RGLxGCdKyEBJvNLxqsdT8BM825Jils8CAd4I+tMryw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b="Tu1/+2Z8"; dkim=pass header.d=wolfsden.cz header.s=mail header.b=mwgLBW0b; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=wolfsden.cz ARC-Seal: i=1; s=key1; d=yhetil.org; t=1690471329; a=rsa-sha256; cv=none; b=DHXAdz194WOy9onEb8FuKHZ31lxH9nt7Gq9ZBRoWyhS23vaVuOOOfsJipSOExSNgZRIeEd 4G7Lbs675Bnl5LokEAIkZg4n5mTUUpRYA4scWRDJyjO/zkzJTRojaQ94qq7Z/3fvUfQRZZ DA3oyMFnlO940qPSAZ0YwhNoFcmt1b9F5nUr5cvJzjrmoDJJU1qGsxcE6l4tPFd9MD150E naiKNxirUg5+z2Fgrg6RxEtroDQmBLKNPLd7ygXrHGEDTtJwHIvrFtMiyMNT/IwrQCZVY/ NXuGoIabFu6txrbqYbtx05A5k961ovzgXrNhMztpTJLQ7PhE09V5wHeG5IqhrA== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qP2jX-0007JP-05; Thu, 27 Jul 2023 11:16:55 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP2jO-0007Gc-ML for help-guix@gnu.org; Thu, 27 Jul 2023 11:16:51 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qP2jL-0004Aa-Fw for help-guix@gnu.org; Thu, 27 Jul 2023 11:16:46 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 162CC2668C1; Thu, 27 Jul 2023 15:16:37 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1690470997; bh=38iT5jIAwsPVJiRJ8+qZem1dgZbB/icsh4f+ioNUt4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Tu1/+2Z8l2P7F4vcCBQId86pxmBktQhLaBrcS/3Z9gLT7uMJGZzsPIeSIm8pBzkNk PfEjVn9LULiDy8blnPC9IJX4lZgFW1ph/2A/mGZmwgbag5G+okpXKEKRL9QcSn9rQs wOy3RCTE65A4u6BM2WYifT67Ai3GSI36XNbIY9vrFQLYocyitTS2WBZ/nlqJvkm+pW 8jifipf0bc4SZGtGq7BOVEC2KNcyDqZ+Qg+l+dUCzBfokyCMcyQAjWld4UB52m47A/ G970Ee/vf7nFr2Qwef8y8HOjVjzyN5WR9R+TBPt5fpsihy1osddea35TRvq0+CevsL xvnjDm3nu8H3OFBXhngBRRvMWSPr4r7wRoOpJ+ZrsdfpP1WngdmjwZ1tOTGeKSLgSg MpIb0ILNr+OJxPxzfDTCL4u2SgQYxYjM9K8hnWrs6sFj95TX9d+QSkty7p4jZHFbRL fTjp3Z3tjNWuuw0EXGTLngvPgU+/5Q6aSh080J34k3WTWPPAVTkQgeATX2fHLuHXXS ig/SeSa+RI2sSqwQPaRAWSEanTGpYJHntPu9LcdlCZwX8lHkLy1XVLUBj6T9z4uu46 RzSIyvnW8GzHSFGnxW1rCN0ueW9nVvYGOv32Y6yAaSkA56Ebhldda5ZzQAuZobKI6P q1tRKi6cZL2Llmjz9CiFXock= Received: from localhost (unknown [128.0.188.242]) by wolfsden.cz (Postfix) with ESMTPSA id 4D0C3265E72; Thu, 27 Jul 2023 15:16:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1690470996; bh=38iT5jIAwsPVJiRJ8+qZem1dgZbB/icsh4f+ioNUt4g=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=mwgLBW0bHOS9GXYPtKBQLHei/gUdo923/M+J4EiOyTVRDat/P3Hdk4C2K4FHInbMA nigJ8YpL8preZCJmTMsNMorA7rB8TiCiQHjFkPsS4wM/42gEb+xniG1qmujZlJHZ3B mU/7sQ3KSqbTR7cxG0tXAsu2bt1BQmDI4xgbIRAlxbrQghIVhvTb8ZTbtidJyQ1FeK on/SE0xRUVkXmLSWA1/32eA6OQJlJPiGPc7PxvsOPwd5l4suRrI/o1Qc66eHDBzZWT rHsTfTIWM9vQe/2uACDFbL+vC2nbc4BakgjQGg2j24inf4uY5Lz+6Hp3kU4n+3luSI j/RQ7vc/lJO9bsQSVkd3JswdF5FYaCKosoBsf+QV3oEhlW1fCjHsNdhyTce15OKAfI /xM3tDmJRED4RtAFuy+2KMuqkj+dpuZ6//IoaUCjd+5I9IZLL71uu4Nzh1YaxBsQyJ 96GdV7NgdTGuS5w7Ur6VU5NsGAnS0yTGAXIUCqAZBDVAMoHPJXmHQZJLtbLmOB/3lB jzOt7mhKDThN+/66AZSixa5fL46MMj13Z0LI1gAU5fHZF0kJQbu1KLPdeJcQilAeyG GUl7agTtqGfvxpDHrPBFL7ncuQqPlnBNQBgCsUjOFfyixhZLYISNLEaWl3UAV2ewQt 0kI7eX+n1yYisp7m6C3/y/l4= Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 743207e7; Thu, 27 Jul 2023 15:16:35 +0000 (UTC) Date: Thu, 27 Jul 2023 17:16:35 +0200 From: wolf To: Csepp Cc: TakeV , help-guix@gnu.org Subject: Re: Serializing service config to YAML Message-ID: Mail-Followup-To: Csepp , TakeV , help-guix@gnu.org References: <875ace7b-beb4-939c-8e25-0dd9c79ccf11@disroot.org> <87sf9a9twv.fsf@riseup.net> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="+jqydrEsASaMYNlt" Content-Disposition: inline In-Reply-To: <87sf9a9twv.fsf@riseup.net> Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -17 X-Spam_score: -1.8 X-Spam_bar: - X-Spam_report: (-1.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, T_SCC_BODY_TEXT_LINE=-0.01, UNPARSEABLE_RELAY=0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -9.50 X-Migadu-Queue-Id: 66B7A5F6BC X-Migadu-Spam-Score: -9.50 X-Migadu-Scanner: mx0.migadu.com X-TUID: UBaOFn0BuMWU --+jqydrEsASaMYNlt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-07-27 00:37:14 +0200, Csepp wrote: >=20 > TakeV writes: >=20 > > [[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_0x640A6795ECDA= AC2F.asc]... > > > > [[End of PGP Signed Part]] >=20 > 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. --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --+jqydrEsASaMYNlt Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmTCilMACgkQL7/ufbZ/ wam7Ew//cAGdeduiBIWJ9x1dPx5NAiIjavrbwVFzS/FfeKjxLXRmm4WuCc/RLxW7 0GGzWPA8mSWLTaqU/FZz/aS48A4vtCsPIiJkZ6cDJ2P+uR+aal1cZqZM7d/vYgwS WujexXduQi4P5Py0YIed1dv8oGuE2IXW2mWj1FTiHER9n4+ZkwUbHK8G1rV06KG+ 8YBy9Q7Jqd6KLKBvKKsiBtsSJUhAfYqsX87dpONoX6hFbiExMuRtBGs4kF308lTU ePGWjuxv1gxeQXBzOYWtKaBqSbuJ01bmDZ2hc+La8w/Bg3pYJ5Ky5sGcHPZsuVD0 7HGDZMKEbMbDdy8p3s/mI2otn/LT+/og/wcYr0EwlrzIbFvet/WpRgbQiYDwufm2 eLliG4PlLhMEGm3tSEffvb5l3Wz8VSPwN5K9pi4kDzX1HIyWuCA9+oCjh2KQveR+ 0k2iNGLgZojZhFfaj0cTrPs6buvL/N79tfP4raAWFHKyajhszqSSylJSWzA97Qks 4AnBMKjbff/jshfQiS5jBRxZuPX+shn88VjJWhn+3hUBsQLrLiWVc4hfTRTmDNhm ADnyQnpF/7Mu2t/rMcrl2mmvPsai5JNmqXi/A1+EE78KpeVbOMeKiGM5oHVt8nlM /+12I5I8Bo+ejfeE/QJfzHlF76GGazBXFogCsFb71uH2fOq5ZlA= =dx2S -----END PGP SIGNATURE----- --+jqydrEsASaMYNlt--