From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id MKHTKG2jw2GHlgAAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 23:15:09 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id 0FWSJG2jw2HzaAAA1q6Kng (envelope-from ) for ; Wed, 22 Dec 2021 22:15:09 +0000 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 6BFE2C067 for ; Wed, 22 Dec 2021 23:15:09 +0100 (CET) Received: from localhost ([::1]:39626 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n09t6-0004kY-Fe for larch@yhetil.org; Wed, 22 Dec 2021 17:15:08 -0500 Received: from eggs.gnu.org ([209.51.188.92]:58918) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n09t0-0004hD-KK for guix-patches@gnu.org; Wed, 22 Dec 2021 17:15:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48374) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n09t0-0004wl-AK for guix-patches@gnu.org; Wed, 22 Dec 2021 17:15:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n09sz-00021A-W3 for guix-patches@gnu.org; Wed, 22 Dec 2021 17:15:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52600] [PATCH] doc: Document (gnu services configuration). Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Dec 2021 22:15:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52600 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Xinglu Chen Cc: Maxim Cournoyer , 52600@debbugs.gnu.org, Andrew Tropin Received: via spool by 52600-submit@debbugs.gnu.org id=B52600.16402112717689 (code B ref 52600); Wed, 22 Dec 2021 22:15:01 +0000 Received: (at 52600) by debbugs.gnu.org; 22 Dec 2021 22:14:31 +0000 Received: from localhost ([127.0.0.1]:59917 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n09sU-0001zs-Dd for submit@debbugs.gnu.org; Wed, 22 Dec 2021 17:14:31 -0500 Received: from hera.aquilenet.fr ([185.233.100.1]:46182) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n09sT-0001zR-3H for 52600@debbugs.gnu.org; Wed, 22 Dec 2021 17:14:29 -0500 Received: from localhost (localhost [127.0.0.1]) by hera.aquilenet.fr (Postfix) with ESMTP id 60CA6329; Wed, 22 Dec 2021 23:14:22 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at aquilenet.fr Received: from hera.aquilenet.fr ([127.0.0.1]) by localhost (hera.aquilenet.fr [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id E4L3q_ls8XRP; Wed, 22 Dec 2021 23:14:21 +0100 (CET) Received: from ribbon (91-160-117-201.subs.proxad.net [91.160.117.201]) by hera.aquilenet.fr (Postfix) with ESMTPSA id 151D4171; Wed, 22 Dec 2021 23:14:20 +0100 (CET) From: Ludovic =?UTF-8?Q?Court=C3=A8s?= References: <665c4d2070de80af1d3594a268f0f6d3fb596d15.1639839498.git.public@yoctocell.xyz> Date: Wed, 22 Dec 2021 23:14:20 +0100 In-Reply-To: <665c4d2070de80af1d3594a268f0f6d3fb596d15.1639839498.git.public@yoctocell.xyz> (Xinglu Chen's message of "Sat, 18 Dec 2021 16:12:38 +0100") Message-ID: <877dbwz3r7.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-Spamd-Bar: + X-Rspamd-Server: hera X-Rspamd-Queue-Id: 60CA6329 X-Spamd-Result: default: False [1.40 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; FREEMAIL_CC(0.00)[debbugs.gnu.org,gmail.com,trop.in]; FROM_HAS_DN(0.00)[]; RCPT_COUNT_THREE(0.00)[4]; FREEMAIL_ENVRCPT(0.00)[gmail.com]; TO_MATCH_ENVRCPT_ALL(0.00)[]; TAGGED_RCPT(0.00)[]; MIME_GOOD(-0.10)[text/plain]; TO_DN_SOME(0.00)[]; FROM_EQ_ENVFROM(0.00)[]; MIME_TRACE(0.00)[0:+]; RCVD_COUNT_TWO(0.00)[2]; RCVD_TLS_ALL(0.00)[]; MID_RHS_MATCH_FROM(0.00)[]; SUSPICIOUS_RECIPS(1.50)[] X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1640211309; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=TUNx36XNkfedE7UgFlle9Yst3MxmnCyyrKnn49ZO0mc=; b=HotrHsULiMgOopiUq4vvH4O1yE+HPlB02+5i4TfckfOFM1DJ9l9acy3eALk4ROxY/uDKhX Hdx5B0c5R5/AnzXbc3Oqik9/bXRke81JLuz3mN9NgpQQ9kk+L0/D90KODwmSU/1VvjrmeQ VaVRoERCaHgXt6RUk9xgnSeXU2OdVja3boBgnWuaX3/W8v2ZHpbPphngkYRM48cOPtr0qk wDeT+a3HzBcCoftUZvR7QTMSIMq57vmtd8q4PJpoPn58OzgvhTHJ+c69J7aMYZbCe+hOpG 9eOLgmOD8Ah5W/jAVr4rIrahabRgS540PfFB0rQAhttou/M7nphIkhU8VI7JYg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640211309; a=rsa-sha256; cv=none; b=qyGlzxYe1qQKmFkDlF9FpzxjddOErno+Uu9KtmIwl5OROsHkQ+TqiOL49YsH5l7NUgbXaH AFxE1QuKadQJM1EtJJ/UvRDx76vWD94akep1bsgVuxTiVMafJ4kiX9kxiJIHORPTcttzfz znCE96eKvpFsTWaVqsrEdVRMOVYZVpBMNU2CMXXTiyBHTaVudxzS7qq8y8Les4t8xDVYE9 9Hxw7n+joWKYswWmxW+It5hb9NXeEXxiuVR6r3Sx4kMRa4K5dwUhEXj7qIjLTBUkp4l9jO GjTH2XDUZUGRlIdPLg3G3vp5CuAoRdERcGBwYnmzbeh8q9zSAuxKKoZpAoOtKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.04 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6BFE2C067 X-Spam-Score: -3.04 X-Migadu-Scanner: scn0.migadu.com X-TUID: W2kb8akLvoFU Hi, Xinglu Chen skribis: > * guix.texi (Complex Configurations): New node. Great work! I applied it and fixed typos Attila reported plus =E2=80=9Cbin= dgs=E2=80=9D (instead of =E2=80=9Cbindings=E2=80=9D). > This patch documents the complex beast that is the (gnu services > configuration) module. I only documented the things that existed before > the Guix Home merge, though. There were a lot of things to document, and > I hope that my explanations aren=E2=80=99t too confusing (It took me a wh= ile to > wrap my head around all of this). :-) It looks very clear to me. > What is still missing is some kind of style guide for writing Guix > services: When should one use (gnu services configuration) vs plain > (guix records)? Should we try to create bindings for all config options > or should we provide an =E2=80=9Cescape hatch=E2=80=9D for users? > > I would personally prefer if most (if not all) services were written > using (gnu services configuration), but I don=E2=80=99t really think refa= ctoring > existing services would really be worth it. But that=E2=80=99s another d= iscussion. Yeah. So far the (unwritten) guideline has always been: =E2=80=A2 Have record types that provide bindings for all or most of the available options; =E2=80=A2 Always provide an =E2=80=9Cescape hatch=E2=80=9D so users can i= nsert raw configuration snippets, either because the bindings don=E2=80=99t cover everything, or because they have an existing config file they=E2=80=99d= like to reuse. We should probably write it down somewhere. Maybe we need a new section next to =E2=80=9CPackaging Guidelines=E2=80=9D to discuss system services? As for =E2=80=98define-configuration=E2=80=99 vs. (guix records) vs. SRFI-9= =E2=80=A6 I don=E2=80=99t think we really discussed the issue or agreed on something. For the rather simple services I wrote, I was happy to use plain records and home-made serializers rather than =E2=80=98define-configuration=E2=80= =99. But overall it seems to make more sense to recommend =E2=80=98define-configurat= ion=E2=80=99 unconditionally. I guess it already has serializers for the most common formats, which are all alike, so we should be able to avoid boilerplate. Thoughts? Thanks for substantially improving the manual! Ludo=E2=80=99.