From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id ILvqEc9SxGHPjAAAgWs5BA (envelope-from ) for ; Thu, 23 Dec 2021 11:43:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id mCfEDc9SxGFaXwAA1q6Kng (envelope-from ) for ; Thu, 23 Dec 2021 10:43:27 +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 CE2A5216D0 for ; Thu, 23 Dec 2021 11:43:26 +0100 (CET) Received: from localhost ([::1]:33482 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n0LZF-0001Id-Tv for larch@yhetil.org; Thu, 23 Dec 2021 05:43:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:43006) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n0LYv-0001Gk-Mz for guix-patches@gnu.org; Thu, 23 Dec 2021 05:43:05 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:48958) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1n0LYs-0005Hr-EI for guix-patches@gnu.org; Thu, 23 Dec 2021 05:43:05 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1n0LYs-0006tt-5i for guix-patches@gnu.org; Thu, 23 Dec 2021 05:43:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52600] [PATCH] doc: Document (gnu services configuration). Resent-From: Xinglu Chen Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 23 Dec 2021 10:43:02 +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: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Attila Lendvai , Maxim Cournoyer , 52600@debbugs.gnu.org, Andrew Tropin Received: via spool by 52600-submit@debbugs.gnu.org id=B52600.164025614826479 (code B ref 52600); Thu, 23 Dec 2021 10:43:02 +0000 Received: (at 52600) by debbugs.gnu.org; 23 Dec 2021 10:42:28 +0000 Received: from localhost ([127.0.0.1]:60504 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0LYK-0006t0-Ad for submit@debbugs.gnu.org; Thu, 23 Dec 2021 05:42:28 -0500 Received: from h87-96-130-155.cust.a3fiber.se ([87.96.130.155]:50750 helo=mail.yoctocell.xyz) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1n0LYI-0006sn-TM for 52600@debbugs.gnu.org; Thu, 23 Dec 2021 05:42:27 -0500 From: Xinglu Chen DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yoctocell.xyz; s=mail; t=1640256140; bh=pKk05i/zZKkrVspWOSY0cx1Few3JY4/60xCWKjtXla0=; h=From:To:Cc:Subject:In-Reply-To:References:Date; b=lHkn9dlF+roQ0Af4oU7mZVjYkPnm28lYU/e8+Gi800qo23fV0FggHxfjL6Sb/DhBe uFoZLvKu+crrq+9rwF2U7Gci9x3Vo8V7yPJcFE5vtHF4ySY5sHCXjoBY41snt80vj7 4dcMkHtS+VYvC/iqFfYZYO6gcUAm/klT/7Sj2HHA= In-Reply-To: <877dbwz3r7.fsf@gnu.org> References: <665c4d2070de80af1d3594a268f0f6d3fb596d15.1639839498.git.public@yoctocell.xyz> <877dbwz3r7.fsf@gnu.org> Date: Thu, 23 Dec 2021 11:42:18 +0100 Message-ID: <87ilvfd2lx.fsf@yoctocell.xyz> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" 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=1640256207; 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: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: dkim-signature; bh=pKk05i/zZKkrVspWOSY0cx1Few3JY4/60xCWKjtXla0=; b=cDCZCl6PZl73GV94Z3EU8AvQJzKkLo640Kn48qyPnWEeTqXCLDf9NqMOrwZlR4MCQeb62Q rXJ5eGoyh0WLlEJ4mMM906hw+BD1bz9Xdg8iKQ2sgeklIEvc4RIcatq5S2JRDGrngxfyEC I4hLPh4vxIbQGNAcDbVxVwE6w0UOMlxcv59o65L0KD95JYVz6s7l/RufrbKam13YmC7o2m NrjZWvj0NZIKZ7vt8UFZ8CiXvp6clJmZLtamG+ClsJFZm/7kY4afKMc7ClDU35+b1KKkPd UZz4xOcu61UW9MieJ+uuBs7KWcpN9ias+hOn0szclasAnCVoGXZ1aM+aEugqyw== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640256207; a=rsa-sha256; cv=none; b=sj4yAwI4OSsExFk+pLjCmlKMCfhq8Ca0VrViQ/UOvkgsY3H7DEfJlYWIPmtVbyZMOANtXp BL/qgJUGcK6zjHqhd3YHI7rIp6+vG1bTmmTQD1nBAOmfeqMb/ioD8ox4AaogDho5Iqc0By OichVdMzzAFpbqS/Ml5WoW3woMsYsPQkgl1gpv7Mwv/hXO34t80f74S6U9PFOxr1HAdAsP x3hvRyohjJG9vt59a90X4UCRVoIjjUvxKs86uPiGW1dvEWAlvusX/3sz69jUw2ACNE9D8I kKCB3ZJ/QEyzL8EuZ1hbCN3ZK+JnvMJ2x/gnzfZHEJV+ufIh4RlKV6/SEMGgLw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=lHkn9dlF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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.85 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=yoctocell.xyz header.s=mail header.b=lHkn9dlF; dmarc=fail reason="SPF not aligned (relaxed)" header.from=yoctocell.xyz (policy=none); 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: CE2A5216D0 X-Spam-Score: -3.85 X-Migadu-Scanner: scn0.migadu.com X-TUID: 2A0kLfzn7Wd7 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Hi, Ludovic schrieb am Mittwoch der 22. Dezember 2021 um 23:14 +01: > Hi, > > Xinglu Chen skribis: > >> * guix.texi (Complex Configurations): New node. > > Great work! I applied it and fixed typos Attila reported plus =E2=80=9Cb= indgs=E2=80=9D > (instead of =E2=80=9Cbindings=E2=80=9D). Great, thanks for taking a look. I didn=E2=80=99t receive any message from Attila though, and there doesn=E2=80=99t seem to be anything on the ML eith= er. I guess he sent it when all the GNU infra was down, but unless he didn=E2= =80=99t Cc me, I don=E2=80=99t see why I wouldn=E2=80=99t receive it. >> 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 w= hile to >> wrap my head around all of this). :-) > > It looks very clear to me. Good to know. :-) >> 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 ref= actoring >> existing services would really be worth it. But that=E2=80=99s another = discussion. > > 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= insert raw > configuration snippets, either because the bindings don=E2=80=99t cov= er > 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? That sounds like a good idea; Andrew started to work on something like that[1]. > 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-configur= ation=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? Agreed, since =E2=80=98define-configuration=E2=80=99 & friends are now docu= mented, it makes even more sense to use them. > Thanks for substantially improving the manual! You are welcome! :-) [1]: --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJJBAEBCAAzFiEEAVhh4yyK5+SEykIzrPUJmaL7XHkFAmHEUosVHHB1YmxpY0B5 b2N0b2NlbGwueHl6AAoJEKz1CZmi+1x5Rn8P/3cHPPncCAhpBaiOKkg2IYB3YMNz X5OdEEiVMMqA5oxcY2vNX8mxDc/daVsixUFc1cq+H5KKo9SU5Jl1Lh0a8XFEikmP zKZjZbdPA0ohyM4ZI3pKGkFY2s6ZV2YiB5VlMOUuOQmiasvX4z+EHpuZVP+7qhjb No0I3cPOxTvdQP8LUraxAzO6bR5eYFOVLsyqWXTAgWa15l4C7gKOiMZiahaMNLXC h+acznf0O9uBu7O6dlerNQfaV4/MhuvQ6oBLEpYYyWgeT42KUUMnleGfmtalKUFI 1ZTKKjNrX+5GD+pWEra5XcZGhu7GP815ZNwruAOc+SWqIKAv8Af4xMI1xvmVBzWm rztAhNmqnNDY0x0RtcychkQTQzRznR4qTJnpn05uSJFJXUmWTFJldZyOJ4fTAiG7 v+YiesYSCHkTstyv9WsL6l4OV/hmx5Efe/6UuOSM5f42nTEwI5nxhlAi7N4UA1vE LGHPvvy0wRH/NEG3/bsMM16kauiScIUPZj0ukaMxBhwjWKh7hKl/I7h+9seJpylP utR/hME+CfPmU76gu0AQqbvbpCSP7V7XlBRPcJuENlTF9Jso6wocJdpixdpoQFFX yb+7Ld6B1WvMZmuirnKq/S12Xuxza2dV2KenVf+GBaxxwPtVayKkcEd7gIL2FWwH yV0xmGMD4HIkzJQI =So/f -----END PGP SIGNATURE----- --=-=-=--