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 AGQFLbhiQWRHQQEASxT56A (envelope-from ) for ; Thu, 20 Apr 2023 18:05:12 +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 UInMLLhiQWSbegEAauVa8A (envelope-from ) for ; Thu, 20 Apr 2023 18:05:12 +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 45C2A8426 for ; Thu, 20 Apr 2023 18:05:12 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ppWDV-0008Oz-Eo; Thu, 20 Apr 2023 11:29:01 -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 1ppWDU-0008MH-3E for guix-devel@gnu.org; Thu, 20 Apr 2023 11:29:00 -0400 Received: from relay6-d.mail.gandi.net ([217.70.183.198]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ppWDQ-0007T5-Vn; Thu, 20 Apr 2023 11:28:59 -0400 Received: (Authenticated sender: tanguy@bioneland.org) by mail.gandi.net (Postfix) with ESMTPSA id 46113C000B; Thu, 20 Apr 2023 15:28:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bioneland.org; s=gm1; t=1682004533; h=from:from: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; bh=yYdjO2mDgTy96R9ic3HbZsTNOd7/g+7OJIfOofTukLM=; b=Yuw3nQQB52+AxJGQGc2R9TGmQ35BRj5Kons0WkP/feBChwC0vbt9nG4qdhPz47PiaWxDkV RcrllMiIBVt2MXOe8UuRh2w109cXmA0S3uAsDp+IDqMRsFo8tmybDD/S6EnMtEXkEMRnj9 VQrqpVPL8jzeXJdeDZbvRnz+FJiGpvvLvZIJiHB1Tf7vsESA/AbqTvUB/4QaRcLdrzG9rn XUtMfv56yw4z+PPdrwLhsYJfbeLxPfJKmUKH5bAnsCMfYCFlAcpRkmDaA4E4ddnchHJAzM uKlBNjXG+QbiuNcjYwvQXZ3O/hWmNKyQyEYlRv9F59LhNaoh7O2tKUF2zGvKcQ== Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable References: <167976320326.6475.15093558555393216956@localhost> <168059431883.4793.18067611286272607697@localhost> <87pm87wm27.fsf@gnu.org> <168147383584.28031.934590679059064569@localhost> <87jzyaeih5.fsf@gnu.org> Subject: Re: Contributing Guix Home services From: Tanguy LE CARROUR Cc: guix-devel@gnu.org To: Ludovic =?utf-8?q?Court=C3=A8s?= In-Reply-To: <87jzyaeih5.fsf@gnu.org> Date: Thu, 20 Apr 2023 17:28:52 +0200 Message-ID: <168200453237.12030.10686882904904843012@localhost> User-Agent: alot/0.10 Received-SPF: pass client-ip=217.70.183.198; envelope-from=tanguy@bioneland.org; helo=relay6-d.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, 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-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1682006712; a=rsa-sha256; cv=none; b=YhCt/8yvO1dLrZduE8RMnZyX6u78HyESF/+i0vJSaapPUgAD7FZsJ2sDcAOWHmr6nHItmR xCdupxFPfWnibC4OFYGUNw2bQYw7LK9eZ2rf2eXpp6Y9RBmBaW/K+5cvXz6onMEFVSPu0i K0xVLLyvlHIZtilSV5glIwy7EpYBojL1UO/1jVM7mPItN/iQAHUNv6QzfVinpMxWC2vlRF ptjjucibZIu9p/CwMM4E15Gh/u2kgVdBaN6jvYq8GvoZdb0Rof1YM1wf6y9Ovwe6obEozs b2N7x6MsKJOlHKk+cjK06pVRfWhI2dwTDkH+gzCIcyZLL2tOtL8vtGADU4d4/g== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=bioneland.org header.s=gm1 header.b=Yuw3nQQB; dmarc=pass (policy=none) header.from=bioneland.org; 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-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1682006712; 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=yYdjO2mDgTy96R9ic3HbZsTNOd7/g+7OJIfOofTukLM=; b=qlq+nAjSruk7j/lTkNCNc2xmpPXFFn2/YdbbJ2eSuay47svwxAQvL2Jf6nX3XNTYXvwNtw LxAe/Ce+qYSVxoToE+eP2hjt5/jf86OPVSivC7UsKRYGKtIPAEzmqjD/Ecjgrkv2hihlYH /8Twz3NQGSAZF2BF7j/aSF6jyZZyBOb/ea+O37P0yiCdj8KTatcy47NSWV1cLl52JEawl3 3c+lOgUk6bp9ygQU+TNtqlmFiTyqeq5knqubwT6bTsHBSG60zx58V19hsMFCooefH9NoiY EJrifwiKCQYUsEbymSnMvC7b4TdYcQyzMtvGFm5SoYAaSHwqhlCnb82SktM+cA== X-Migadu-Spam-Score: -7.01 X-Spam-Score: -7.01 X-Migadu-Queue-Id: 45C2A8426 X-Migadu-Scanner: scn0.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=bioneland.org header.s=gm1 header.b=Yuw3nQQB; dmarc=pass (policy=none) header.from=bioneland.org; 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" X-TUID: YWm4ZT5UGaB+ Hi Ludo=E2=80=99, Quoting Ludovic Court=C3=A8s (2023-04-17 15:39:02) > Tanguy LE CARROUR skribis: > > It's been quite a journey on my side! Ups. Downs. Mostly downs, though!= =F0=9F=98=85 > > Thanks to Simon's unconditional technical and moral support, a **LOT** > > has changed since I sent this message. Hopefully for the better! =F0=9F= =A4=9E >=20 > Heh. :-) While it=E2=80=99s fresh on your mind, it would be nice to lis= t the > problems you ran into on your journey and see what we can do about it. Mostly figuring out how to test it! On my machine at home, `guix home reconfigure` can take minutes. And some errors don't actually show up. After trying different solutions, I eventually settled on the following: while developing, I add, at the end of service file, something like: ```scheme (define configuration (home-service-configuration ; [=E2=80=A6] ) (mixed-text-file "test" (serialize-configuration configuration home-service-configuration-fields)) ``` And then I run: ```console > cat (guix build -f path/to/home/service.scm) # =E2=80=A6 the content of the generated file ``` I can only test file generation, though. Then I painfully discovered that replacing in a string is not as easy as it sounds, or, more precisely, that "python replace in string" yields better results than "scheme replace in string" in DuckDuckGo! I've also used `gexp` in places where I'm not sure it makes any sense, but it works, so=E2=80=A6 #pragmatic! > > At least now one of them [1] looks like a decent home service. Except > > for the problem with `(every khal-calendar? lst)` that I haven't figure > > out yet. > > > > [1]: https://git.easter-eggs.org/bioneland/guix/-/blob/main/bioneland/h= ome/services/khal.scm > > > > > > The one for MSMTP [2] does not contain all the available options, but a= ll > > the configurations and serializers are there. > > > > [2]: https://git.easter-eggs.org/bioneland/guix/-/blob/main/bioneland/h= ome/services/msmtp.scm >=20 > I don=E2=80=99t use these two programs, but the services look nice! The = extra > bit of work you=E2=80=99d have to do is documentation, similar to what is= done > for the other Home services. Maybe start with msmtp to get a feel of > what that entails? `(configuration->documentation 'home-msmtp-configuration)` `(configuration->documentation 'msmtp-account)` `(configuration->documentation 'msmtp-configuration)` =E2=80=A6 *et voil=C3=A0=C2=A0!* > >> There=E2=80=99s no formal rule, but I think that what we=E2=80=99ve be= en doing so far is to ensure basic functionality of > >> the service is covered, and to provide an =E2=80=9Cescape hatch=E2=80= =9D for bits of the > >> configuration that are not covered. > > > > If by "escape hatch" you mean `extra-config`, you're right! >=20 > Yup! The convention seems to be `extra-content`, but you knew what I meant, righ= t!? =F0=9F=98=85 > > I'll try to submit a patch for one of the two mentioned above soon=E2= =80=A6ish! >=20 > Excellent, thanks! Done! I could have done a **lot** more with the documentation, but I wanted to be sure to get the basic right first. --=20 Tanguy