From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id 6KlUHqrON2QDRAEASxT56A (envelope-from ) for ; Thu, 13 Apr 2023 11:43:06 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SBZwHarON2SfFgEAG6o9tA (envelope-from ) for ; Thu, 13 Apr 2023 11:43:06 +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 EF19A13EFA for ; Thu, 13 Apr 2023 11:43:05 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pmtTP-0001V7-4G; Thu, 13 Apr 2023 05:42:35 -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 1pmtTN-0001Tg-SJ for guix-devel@gnu.org; Thu, 13 Apr 2023 05:42:34 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmtTM-0002jf-Jb; Thu, 13 Apr 2023 05:42:32 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:In-Reply-To:Date:References:Subject:To: From; bh=vaB106LvYjOBNfTRm/t7FDjVeomeGYTscIMCt1WrwT4=; b=Chn/j1fnmBe8yJuZDOpN fUYna4lkhOWYf9hWw9f4q+cYrDG4ECBmAjrSsvNuxsfTaaznwc7r1UJru3qPfx3JIjWUbF61j/f4s dh+G7fuhXW4cm16nuubK+aosoneGy7fpDXdnPS6hvdvhUUKxIHcPmfvdK2uHQf1gVhXbwPE4BCbzy xEqexLVbMZHj33tPIMOJW7kt6A416ofPzq9rHbB6We+iEMyy3epYsTvsbjSttEIFCA0V14cLqvdU6 kW8U83vU4iZlOmncrpFhYBjoFL4zTxkQcELahdhFvM9T6UsBdSy+jFd8z9YyyaD2FjbH1ca7Epvv7 0PEcNH1Fzj38mg==; Received: from [193.57.121.127] (helo=ribbon) by fencepost.gnu.org with esmtpsa (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pmtTM-0001i6-3n; Thu, 13 Apr 2023 05:42:32 -0400 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Edouard Klein Cc: guix-devel@gnu.org Subject: Re: A friendlier API for operating-system declarations References: <87wn377rst.fsf@rdklein.fr> X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: Quartidi 24 Germinal an 231 de la =?utf-8?Q?R=C3=A9v?= =?utf-8?Q?olution=2C?= jour de la Roquette X-PGP-Key-ID: 0x090B11993D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-pc-linux-gnu Date: Thu, 13 Apr 2023 11:42:29 +0200 In-Reply-To: <87wn377rst.fsf@rdklein.fr> (Edouard Klein's message of "Thu, 23 Mar 2023 09:06:52 +0100") Message-ID: <87zg7cm83e.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Seal: i=1; s=key1; d=yhetil.org; t=1681378986; a=rsa-sha256; cv=none; b=k2m+KRohU+UVEo8Icv7ql+Cq3iLJDd3bzgoz6n+1uB/+09v1PjrhBoG026PxrEtzZjFwII DxHcshL8GPDXRZSmdMxrR8PVb+J9AiCGINich/wmOYNBmhKRD0OfeuEyunpwDKT+QKBVNl yYkPUWi36Hmj7YSmaJuIHwVzfVKWv/sw2gVcggCKhYCHYonR5LbAUZ+fi14AE0qvREsmUH n8EzOV0jpyR09ZSS3P46KToLVM9BKdtvEBABb+8T2OFNPui9WYj+qMYRGbzPFCfocdx/0j SouPPuWsInBJCG7QghuJiifbR+jXmmOHHE3VQ1gEw76Fqy3VqedIo2U5idnUxQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="Chn/j1fn"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1681378986; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vaB106LvYjOBNfTRm/t7FDjVeomeGYTscIMCt1WrwT4=; b=GqSt+pUJG2M/80hjjNNoQv4LJWLzAWnlSaHoP53I0R52XoBT8pQHlV1IuF1jM2t8ed5YjV jyZi5om3nz1zuz0+132C0Ri5zgFp8G/WJRANfXfoUuxuz/HgxANyK01MhPfKfZuqczldPy QONXfXPtDyzy2QBUR7zIu1/5zzKnpwSl2dazmLlzNQDbjOJEAdYSw5VCEvT8o/Hstil9Jf tA9dsdQsBna1+n0fQMZvZzQ/hjdcxRNXHlpV+lAQhhJNlul6JSP7eh28DdDIBm7Ep+uqZB cT8uzTIDeHpGvBuRHbVvPMGOGG1bT0vq8uUoDcn6wOtEjpqOTwxrfc1bPQU6rg== X-Migadu-Queue-Id: EF19A13EFA Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gnu.org header.s=fencepost-gnu-org header.b="Chn/j1fn"; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org"; dmarc=pass (policy=none) header.from=gnu.org X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -9.32 X-Spam-Score: -9.32 X-TUID: IqcWBw3TI0T/ Hi Edouard, Edouard Klein skribis: > For my clients and my own use, I use a layer on top of operating-system > declarations in which I create functions that take an os as a first > argument, and return an os. > > With the help of the handy -> macro, I can chain them, thus allowing an > easy stacking of multiple "roles" or "functionalities" on the same > machine, and an easy transfer of said functionality to another machine: > just cut and paste one line from one declaration to the other. > > I have written a tutorial for my clients here: > > https://guix-hosting.com/docs/tuto/getting-started.html Very nice! > After a few months of experience, and positive feedback from my clients, > my question to you guys is: would you be interested in mainlining this, > or should I keep my development efforts separate in my channel ? I think it=E2=80=99s worth considering, taking into account maintenance considerations as Liliana wrote. > I do think this API is easier than manipulating services, and although > extendable services are awesome and a very nifty piece of engineering, > they require quite a good knowledge of scheme and take a while to be > used to, while this new API, while way less powerful, lowers the barrier > to entry for newcomers. Normally, adding a service amounts to adding a line in the =E2=80=98service= s=E2=80=99 field: (operating-system ;; =E2=80=A6 (services (append (list (service nginx-service-type) =E2=80=A6) %base-services))) It is more verbose that what you have, but it=E2=80=99s still roughly one l= ine (or one entry) per service. Another interesting bit in your channel are templates though: an OS template for hosting at OVH, etc. These are very valuable because they take care of all the boilerplate. Thanks for sharing! Ludo=E2=80=99.