From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id IBl7KFyHTGVIQwEAauVa8A:P1 (envelope-from ) for ; Thu, 09 Nov 2023 08:16:44 +0100 Received: from aspmx1.migadu.com ([2001:41d0:303:e16b::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id IBl7KFyHTGVIQwEAauVa8A (envelope-from ) for ; Thu, 09 Nov 2023 08:16:44 +0100 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 465FF17635 for ; Thu, 9 Nov 2023 08:16:44 +0100 (CET) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JwFBeodh; 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=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1699514204; 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:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=n7i9TTE66wIQIV5+/O7R3tvd9zQ/atdK4sEtacIikiU=; b=bKBRD+sxTyZ5etp26f9YRbVpy2Sulc1xulB1vI4Mn9MvscDcfDQKdamvuwV4i3iuTW8TWG AcV9JprS0nhMC6sg19aXVFLTfYWfQrdYii3lwTMF6VGUDP59vDrvKox8i7HckDUusJ9rO8 6HUkJ5eEQa8Qg1uMFYbDY/G2V5W5WViCwxBLcWGHU96hoKO0rViiu+oBWDLZNV9pVkVMxD /9ZYuVNseMVaJBFCsJcyU1bsL/E2qVL+M8NfDVirwmE3zSEHo2wWhcdNEiYqG5uwm4lzyr aP/XhvshqTcrM6fPXMZAmSyP1wqSIe9Z+Dsh0JHvNGchgGfsrQP/eIGenHvW1Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20230601 header.b=JwFBeodh; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1699514204; a=rsa-sha256; cv=none; b=GwmlhIhwM6r0FDT0Q4E3OLQ9VMANNKM7om4eCHcnxMwfeWDbAYbDH6NDBWYqPUObVow97Q FjXez6KtTjMer+Tg238p3auopKR5FCf/kOGzOuca+yseSkcTgTH6PNk6lZ4qj1RAjDZoI0 p4j4Gqr9x3lPaJECeaSuWqzx/erPtA/DsXdk8JA+TShNj9rRSMjOa7sz6Isl3QbbmxSZMP u+RViAhzxoCGXw0dvot1cdSHf+VaxRJfz5a5+g6nBB8ijnlURoWrQublJOXTPDVf6GldeD yi3/IxQn2bT+ecMbPmcIpXWX2fHWezvOzzlvu6s+mmLRCkgUv/Nvko2RyeQOlg== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r0zGl-0004zK-4j; Thu, 09 Nov 2023 02:16:03 -0500 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 1r0zGi-0004yN-67 for guix-devel@gnu.org; Thu, 09 Nov 2023 02:16:00 -0500 Received: from mail-wm1-x32c.google.com ([2a00:1450:4864:20::32c]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r0zGP-0003IM-0D for guix-devel@gnu.org; Thu, 09 Nov 2023 02:15:57 -0500 Received: by mail-wm1-x32c.google.com with SMTP id 5b1f17b1804b1-4084de32db5so3657775e9.0 for ; Wed, 08 Nov 2023 23:15:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699514131; x=1700118931; darn=gnu.org; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=n7i9TTE66wIQIV5+/O7R3tvd9zQ/atdK4sEtacIikiU=; b=JwFBeodhRIHw4FRzL/LQ1lBR9LDRKtSTaltCtnyv0wAQZZhsGDAN0HuHsBr1nRo73J DOu+Q9dxTvkbAoHnxQSvtbeMSMBHiaVCl+CykDpKMs7BaBU+gNkljh+8dtbxaNfVZnp/ p2jcHKvYJZjH3013/lokVkTCIDBOKUiI9muImQkfX0ZNLUvsUUKEVm9NwX5k0DwPmNkv nj3ChsPqkiZll7kYzS4ivTk+BGbI8bDpsolYSSRP2bZyoUTVXRnNlh+7oT6zzE+LwTA2 kp00GhOSPZV/C4R4HikiV58+vKd+DHF5Zhoz2IsGmfkbVXrcqFITycDJR8YzLjswLucs nqSQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699514131; x=1700118931; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=n7i9TTE66wIQIV5+/O7R3tvd9zQ/atdK4sEtacIikiU=; b=Q6kseujVRDwo2mShVKoWmEnwKaauFR2agGpbgEtMnPC0Zf0DvWbPbU0wv/FNQBd5v3 CKJSjZ5xKXly6qNyMwZv1zIr7K8jXdxoJjlLTQOwozZkmxZCSeDLtVATzAfM00oWU7RG NkhLRJ4xqeyWAF5ODwuWEAGu0giE15vPYKf+WD+awAMcDUD2UWRVt/7NtqV7ziJl39n0 JiDtVIOKOODIFzhb/tooJ53HdzGE8OZlURwjHfLgTpCTQzumIvSXxnxeObMi2Wdz5ooN KpeSvsxtAUFPbtILOYz/3pvhfvZd2fMQxrneMxsb2CToasv6OM6tFHNQ2IMaeXCqvQti NlSQ== X-Gm-Message-State: AOJu0YyZxUBwMY/FVj0sXwNS1fnKMVxQYfq3THDFJsUWU4nmZbq89S7i AIIXNDwnNMAV5EsffnpmO2E= X-Google-Smtp-Source: AGHT+IGf/uUfx3vh4/30p59/SJ9vIyGTG5CflJWeCt57RDUya1/ZukHFZRh73rCgZO6s930ZlPlhbQ== X-Received: by 2002:a05:600c:458e:b0:409:4e8f:4b27 with SMTP id r14-20020a05600c458e00b004094e8f4b27mr3482862wmo.33.1699514131005; Wed, 08 Nov 2023 23:15:31 -0800 (PST) Received: from localhost ([2a02:ed3:910:f600:f823:ecb4:394c:b4a3]) by smtp.gmail.com with ESMTPSA id j14-20020a05600c190e00b004094c5d929asm1156241wmq.10.2023.11.08.23.15.30 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 08 Nov 2023 23:15:30 -0800 (PST) Date: Thu, 9 Nov 2023 09:15:29 +0200 From: Efraim Flashner To: Maxim Cournoyer Cc: Bruno Victal , guix-devel@gnu.org Subject: Re: Divvying up service definitions Message-ID: Mail-Followup-To: Maxim Cournoyer , Bruno Victal , guix-devel@gnu.org References: <878r7skrpx.fsf@makinata.eu> <87pm0lk15w.fsf@gmail.com> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="yarlKqE7/ANHttqC" Content-Disposition: inline In-Reply-To: <87pm0lk15w.fsf@gmail.com> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::32c; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x32c.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.25, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 X-Migadu-Spam-Score: -2.21 X-Spam-Score: -2.21 X-Migadu-Queue-Id: 465FF17635 X-Migadu-Scanner: mx13.migadu.com X-TUID: 3yWHZZPOAZ0A --yarlKqE7/ANHttqC Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Nov 07, 2023 at 10:56:11AM -0500, Maxim Cournoyer wrote: > Hi Bruno, >=20 > Bruno Victal writes: >=20 > > Hi, > > > > As the gnu/services and gnu/home/services grow, I think we should > > consider divvying the services into stand-alone modules or > > subdirectories. > > > > Consider the =E2=8C=9Cdovecot-service-type=E2=8C=9D in gnu/services/mai= l.scm: as of > > commit 'd22d2a05c389207f8cdcf824be7738b1499a987c' this service > > definition is nearly 1600 lines long, with the remainder of the file > > comprising of four other services with rudimentary support. > > > > It becomes troublesome working with such amalgamations as it makes it > > hard to keep track of the used modules and bindings, especially when > > define-configuration is used since the serializing procedures might be > > used by various service definitions. Further complicating things is > > 'define-maybe', whose use monopolizes the predicate and serializers for > > a particular service definition. > > > > Now, I'm not saying that we should go and split everything into its own > > module, I'm saying that we should be allowed to split some of them if > > convenient (all subjective but I believe we can see that working with a > > monolithic file in the kilolines where the interactions aren't obvious > > is not fun, and that's without bringing in the hygienic issues > > surrounding define-configuration and define-maybe). > > > > Some considerations (using dovecot-service-type as an example): > > * Splitting this as gnu/services/mail/dovecot.scm. > > We preserve the logical grouping of the services (with the addition > > that, for extremely comprehensive definitions, these can be neatly > > organized into subdirectories. (same structure seen with gnu/*.scm) > > A drawback is that 'use-service-modules' might not work with this > > although I wonder whether 'use-service-modules' & co. provide any > > value if we are already doing '(use-modules (gnu) =E2=80=A6)' to begi= n with. > > They look redundant IMO. > > > > * Splitting this as gnu/services/dovecot.scm. > > We keep it compatible with 'use-service-modules' at the cost of having > > a multitude of files under gnu/services, without any logical grouping > > (messy). >=20 > That's a great initiative! I agree that multiple 'define-configuration' > services per file can be a bit messy, having to use prefixes everywhere, > making the definitions more verbose. >=20 > I don't have a strong preference of the caterogization of services, but > would perhaps prefer the first one (gnu/services/mail/dovecot.scm), > which could then make it easy to offer some interface as > gnu/services/mail.scm that'd re-export all that is needed (would that > work, or reintroduce the same top-level clashes?). I assume the define-maybe's aren't public, so I'd guess that shouldn't cause a problem as long as they aren't exported. There's some services, like ntpd and openntpd, which reuse the service user/group between them, I think with those being intentional about making sure there aren't clashes, or making sure they line up, would also be a good choice. Or moving the define-maybes to the top of the file and reusing them between services. Is that a possibility? --=20 Efraim Flashner =D7=A8=D7=A0=D7=A9=D7=9C=D7=A4 = =D7=9D=D7=99=D7=A8=D7=A4=D7=90 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --yarlKqE7/ANHttqC Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmVMhw4ACgkQQarn3Mo9 g1FzNQ/7BDhhStcvpGCu/H0+ZNQsHTxREq1ou0RDlbqEYgyABuNFLKwoqN7pXxUq 9wBIa3TvOM2HMQbzawR++jB63eh6kkbkKwZAS3gjoZqqXliEe2ggwQ6Nh0Zgo+58 zd5rA0nA6exIz02fsecW/UO8WgmdKIsQK4csDPHLe+SpCBs/kh2dLkF3hxJzTfZP zpWXasyoxgpvCoindXd46bL24ROGWshDPPT0s+yNwZoCS7G4tZGiOB1UiCfIRcKr DiAC6gYoEgNjvMpJPHpjQfy8dWluwCceGjCVwXrJFhP1Qan5ec2JS+L1bJac5Ybg 2N9dZRg/vMrfmpgGhO/SFe+f1kKawqaPMh5OG8gB83+EujcOhWHS/Usm41RHfRIC znBCG96DVg2IJpGdczBrUltpGQ4s1aH8C7ocGHMIrzn547PLVixJtnL72NKNF5Ag dPOq2SyOsqLBDhdApB3fziGP791SPVvI7/cMebCHDPcAP00fMrC+we4z9xZl5P4J /YHynxceJwus9+s9q001+yeuoPBHYV0gqcTmJqssmGX/e/SE6Y056WKVpifYgIPw ZWLi1F8LbyqQ1TxGDi1WDBQqvQQI/JEMjm6D3ZkSVogRCTUMrnGUb2zAiHYc/oBk dpbSe/9lAadDJF0If88swz9BQwlogHM36+1b+dCWYkGc6vYJeeE= =59b/ -----END PGP SIGNATURE----- --yarlKqE7/ANHttqC--