From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.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 +AvMDCI6ZmRHOwAASxT56A (envelope-from ) for ; Thu, 18 May 2023 16:45:54 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id qCJ+DCI6ZmTlwgAAauVa8A (envelope-from ) for ; Thu, 18 May 2023 16:45:54 +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 CF6803E22D for ; Thu, 18 May 2023 16:45:53 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pzesj-0003ZO-JH; Thu, 18 May 2023 10:45:29 -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 1pzese-0003Wr-5M for guix-devel@gnu.org; Thu, 18 May 2023 10:45:27 -0400 Received: from sender11-op-o11.zoho.eu ([31.186.226.225]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pzesY-00033S-FN; Thu, 18 May 2023 10:45:22 -0400 ARC-Seal: i=1; a=rsa-sha256; t=1684421106; cv=none; d=zohomail.eu; s=zohoarc; b=IAR5w5jq+X6yKHCBxl+koPYanxQnZbWfn6EKiCRi7/0gmcNhYknkSbYRjD+jTVJtqzSHptOfR2Hso1QgTTQOmpkU0ktch7OiB5yTu1G90f8BlORguZjWOWEKlcuhmcf7K5bRN+bqgUV/zdauJQA6oSrR+Qepqg8iaIMrArncrH4= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1684421106; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=4jX7oH6nHa6e7XHmgxxXSpnq/uhIB8rHonDhsjzS4bQ=; b=hrLgLnPp1Je+EdydYJ1WTmiNSrZYV0sBQblbizTMbXshosw4AEQAZ/V0SIv6sHcMKzCitsR71ArhEfvcy5y6aQulFwDqJq8JZvbVIpKddgQU+EdzAQtERKvRSSuG2VBfnIuvLcNIMmpSHrEZTowlS/U7XjCn5Dj4iMzCNxmq/Ts= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=rdklein.fr; spf=pass smtp.mailfrom=edou@rdklein.fr; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1684421106; s=zoho; d=rdklein.fr; i=edou@rdklein.fr; h=References:From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:In-reply-to:Message-ID:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=4jX7oH6nHa6e7XHmgxxXSpnq/uhIB8rHonDhsjzS4bQ=; b=SXoKn0af1HZ+7t4R+62jH7Jc/RdKTGhIUpTIDc/lg1Z/cjtjNUqFVJq3nrhZ6N0v MNQhUpOSBFjl7B+T/Dn3bBijfsuy0VPr4jSlsyur6LO+rJt0iPEgpRZp1kJPSOLT+Id xg3C4pnT/hP7SkBQOlVqmG+/SinqPSyRK6nV5yfeoe5qPpU38xjm0JyHgJ1BmFPsZvM YDDBAqrJ+b0GagdYO/OprpypoCAKFyW3GSr9iHBwh+MlUry4cPOn0axaVx2I8gtfa4p CTeLQMyyamuuQ/97E5UzMZ7Uc+nmK10xXmY6Yu9uWmiUS/JiPvxO41LsoDh80aHbcOK Zu4JT0WrHQ== Received: from venerable (239.86.95.79.rev.sfr.net [79.95.86.239]) by mx.zoho.eu with SMTPS id 16844211040183.46680195602994; Thu, 18 May 2023 16:45:04 +0200 (CEST) References: <87wn377rst.fsf@rdklein.fr> <87zg7cm83e.fsf@gnu.org> User-agent: mu4e 1.8.9; emacs 28.2 From: Edouard Klein To: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Subject: Re: A friendlier API for operating-system declarations Date: Thu, 18 May 2023 16:37:22 +0200 In-reply-to: <87zg7cm83e.fsf@gnu.org> Message-ID: <87cz2xhf6s.fsf@rdklein.fr> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-ZohoMailClient: External Received-SPF: pass client-ip=31.186.226.225; envelope-from=edou@rdklein.fr; helo=sender11-op-o11.zoho.eu X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action 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=2; s=key1; d=yhetil.org; t=1684421154; a=rsa-sha256; cv=pass; b=eCnkYosIERc7VNXRD8Uhtv3yzU28ENgBvRZAlEr7BYqiw2XXKTrY2URXSi39LnwemWWDGj 1y+HnTbdD5u7ziS65NYbQAAsr3kWt9M3CaYORHO1U6TteayY9m9aKSGNg+TQVxxEd4PnRJ 0++Nz30bSFjQD31gfTHkqoXMK1PridzRiVu3rFu7b9UbRJqv6JthYCo9M898OtpiOfGais G6/BPGZjrNlgLQPJ1763bGZ2h2cQa5gIlhuD93ld1n4qf6FYeS6inKhEMbs/+fFf5abBiO UYFR4vC+tbzHYhspOiTB7PzQSp1L59qaAgvKIxpr8KkYgRyd83SI0BSJBBEd8A== ARC-Authentication-Results: i=2; aspmx1.migadu.com; dkim=pass header.d=rdklein.fr header.s=zoho header.b=SXoKn0af; dmarc=none; 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"; arc=pass ("zohomail.eu:s=zohoarc:i=1") ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1684421154; 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=4jX7oH6nHa6e7XHmgxxXSpnq/uhIB8rHonDhsjzS4bQ=; b=jsmgr7zyGoiD0J1dzAAnW0M7Sa0S8LkjhNW88HzzqN0XPQ11QRPCIwcTqrThf7rE92xRon asvt9/jn/6v7h5CG8ey/3OFizFA2QaEKdE6UeI2sA5Za0bfkq0kW04aA9A3xv4qEbbkcKN zAof+DYIO/DeQS0Lm6fSPGO46rNQQB7e+eTVb4511zgA9fXAUhujO/ytHaNdG+KHSifio/ KfaSI+KHNvWVeN+aPJ5qt06T3MiZcyBa1Vl6J43IgB6q1V49tD0CGQTZGlLptBsE2ZZ+dh Kwsa4q1/rtL84R9WWQCGrkyZHIyAF2Ip7Y2YEr7olZR0XmH5mVsUU12zjfoMDQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=rdklein.fr header.s=zoho header.b=SXoKn0af; dmarc=none; 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"; arc=pass ("zohomail.eu:s=zohoarc:i=1") X-Migadu-Spam-Score: -4.69 X-Spam-Score: -4.69 X-Migadu-Queue-Id: CF6803E22D X-TUID: POftcEwR8/jb Hi ! Ludovic Court=C3=A8s writes: > 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. > Indeed. This was started as a quick and dirty overlay over guix to make it easier for people used to Ansible to deal with declarative OS configuration with guix, but it now need to be easy to maintain. >> 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=98servi= ces=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= line > (or one entry) per service. > You wouldn't believe the irrational fear of nested parentheses some people have ;-) I do agree a purely functional interface to OS declaration wouldn't bring much over the existing one. My goal is to then compose those primitive functions into usually-used-together bundles, such as e.g. nginx+gunicorn+flask in a function called, maybe, 'python-webapp'. This is kind of subjective, though. I have my own usage and some customer feedback to guide me, but we can keep it on my channel until we feel confident that the additional value is worth the maintenance cost. > 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. > I'd be happy to mainline it. I'll submit a patch when I get back home. > Thanks for sharing! > Well thanks to you for starting the whole schmilblick. > Ludo=E2=80=99. Edouard.