From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id uKFeAe9qKWWubQAAG6o9tA:P1 (envelope-from ) for ; Fri, 13 Oct 2023 18:06:07 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:478a::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id uKFeAe9qKWWubQAAG6o9tA (envelope-from ) for ; Fri, 13 Oct 2023 18:06:07 +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 EB9B966449 for ; Fri, 13 Oct 2023 18:06:03 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=AI7Dkx79; 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"; 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=1697213164; 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: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=dikRUdW1KaYTbsbUdjCHrbHVBAEMd91FCd5nQG5UEDY=; b=BhYb4ZlNj+Ft+Cfm+KUWipzIbO9IeSmWWcWdbqsScfs8YoIJte6v+gcAx38M45GG+5o31m CJAHkq7NeOXLlsXFmJvSpgotQCyfqHUvInrAL6HnDRvEZkeuI34TkbSkC8341jiUiXmtRQ 8ogSxTfy6i4cm59KEt3i0QeJbBU/x89SJIWU+tjpN6i5bWHbfhrdyFAg1w+Q/Z0O0P6SFE fLNEjFK75mAuTFxpL8Ghr8cjwK0cUJkdrbCzBG89K2Msw3uxUl8f3TkzyFs4jyJSVwVHoH bmvTEdtqpnSJf83t0nnEmAkFSTbkWl/Sriv/YtOCmZxEQEKf2t39iuEUYV7tlA== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1697213164; a=rsa-sha256; cv=none; b=LgM6PSsPj5zg1CZhBqju88qcWQie7yqACJkn1P66bahzfZjH6qhckEYQ5jL3SiJBRlazan mHX8mXcRS7Bqy79cCexj7icbgArvVHmdWI66Ae76GelOmmc0fytj8xxTvfSKK6clfHqSrJ IQUX0a0qSlF0NgPFPnmw9cBHXj0skYI1tfBQ2UJD2RtiQ1UDRHblxE9vFqltDjG0qMi6A0 288UI5h+VLTFwXnkBo8cQtUjB2XdvSEhjwSG/bclMvFKJfR+NcNBH2GkuVS3170FqszeLS 1dFaLNJwnVwPhb/Saz0olrVPRCg8Ws/9f+yN9emGnJvFNYNjs4Q42w4HQkqFDw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gnu.org header.s=fencepost-gnu-org header.b=AI7Dkx79; 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"; dmarc=pass (policy=none) header.from=gnu.org Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qrKfa-0002Pn-M9; Fri, 13 Oct 2023 12:05:46 -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 1qrKfV-0002Iy-2B for guix-patches@gnu.org; Fri, 13 Oct 2023 12:05:41 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qrKfU-0000uk-5t for guix-patches@gnu.org; Fri, 13 Oct 2023 12:05:40 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qrKfr-0002SV-6u for guix-patches@gnu.org; Fri, 13 Oct 2023 12:06:03 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#65119] [PATCH 0/8] Sharing service code between Home and System Resent-From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 13 Oct 2023 16:06:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 65119 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Andrew Tropin Cc: 65119@debbugs.gnu.org, =?UTF-8?Q?=E5=AE=8B=E6=96=87=E6=AD=A6?= , paren@disroot.org Received: via spool by 65119-submit@debbugs.gnu.org id=B65119.16972131519400 (code B ref 65119); Fri, 13 Oct 2023 16:06:03 +0000 Received: (at 65119) by debbugs.gnu.org; 13 Oct 2023 16:05:51 +0000 Received: from localhost ([127.0.0.1]:47266 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKfe-0002RY-MW for submit@debbugs.gnu.org; Fri, 13 Oct 2023 12:05:51 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:33412) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qrKfa-0002RC-NA for 65119@debbugs.gnu.org; Fri, 13 Oct 2023 12:05:49 -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 1qrKf7-0000mG-69; Fri, 13 Oct 2023 12:05:17 -0400 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=dikRUdW1KaYTbsbUdjCHrbHVBAEMd91FCd5nQG5UEDY=; b=AI7Dkx79OQd7hT/SViAe tl7RoIq7b9IBVzCxyTuzs1IxxqWPpLVo0vE4skWs69NdHi7vWW6XiKeAODkvcEFvGpbV6sv6htmt7 67K0IPS/s0g8hKTWumFlXboN8Ih/sk0S//+7PS7NHApTgnrvxxQn+i27u066Yvmftdfx5Gm3CyyqA 5PwCjf6TVX4Iw4okxnK+yqxhK81lpTo9Oktl9Lyjp5zZIE8N7YKf0assGiyZJyQ42s4DQ3yiQX8/Z jO8v9JkvQchDqQ0O7v5RTbDygsrtOSBraDOiQ9qAc9eZ4zFes2loLGummwjBfxs3wx0KnGg30lbyS YDCA6gAY/5XNqA==; From: Ludovic =?UTF-8?Q?Court=C3=A8s?= In-Reply-To: <87msxlxozr.fsf@trop.in> (Andrew Tropin's message of "Sun, 17 Sep 2023 11:01:12 +0400") References: <87ttt3a4tm.fsf@envs.net> <87r0nwh5om.fsf@trop.in> <87jztn3uz1.fsf@gnu.org> <87ttsnoct1.fsf@trop.in> <87wmx0z4u4.fsf@gnu.org> <874jk3sk57.fsf@trop.in> <87led9lufr.fsf@gnu.org> <87msxlxozr.fsf@trop.in> Date: Fri, 13 Oct 2023 18:05:14 +0200 Message-ID: <87a5smik3p.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable 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-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Spam-Score: -3.88 X-Migadu-Queue-Id: EB9B966449 X-Migadu-Scanner: mx0.migadu.com X-Migadu-Spam-Score: -3.88 X-TUID: vb4U9TgOHU8F Hi Andrew, Andrew Tropin skribis: > We have > > (extensions > (list (service-extension account-service-type > (const %dicod-accounts)) > (service-extension shepherd-root-service-type > dicod-shepherd-service))) > > > We can do > > (home-environment > (services > (list (service dicod-service-type))) > (service-mapping > `((,shepherd-root-service-type . ,home-shepherd-service-type) > (,account-service-type . ,ignore-service-type)))) As a user writing the =E2=80=98home-environment=E2=80=99 declaration, I don= =E2=80=99t want to know whether a Home service is implemented by mapping a System service to Home, or whether it=E2=80=99s a fully separate implementation. To me, users shouldn=E2=80=99t have to specify service mappings at all; ser= vice mapping is a tool at the disposal of service writers. > Now you can use the same service type and configuration record in > both operating-system and home-environment and use/ignore/interpret the > configuration fields values based on the environment we are building > this thing for. > > Of course service-mapping default value can be generated upfront and > stored in %guix-home-service-mapping or something like that. > > This way we will get rid of almost all home- services and related > configurations. > > Keep in mind that it's a raw idea, not a well-designed solution yet. The good thing is that we seem to agree on the general idea of having a way to map System services to Home. My take is that the mapping is an implementation detail that users do not need to be aware of. > The reason I'm suggesting to revert this patch series is because it > feels to me as a partial solution on the wrong level of abstraction, > which cures the symptoms and also introduces shortcomings and > potentially makes it harder to introduce a proper solution in the > future. I disagree with this assessment. > If this problem is urgent/demanding for you, please invite me for > working or collaborating on the solution explicitly, I plan work on it > anyway, but probably not earlier than the next year. I catched this > thread accidentially BTW, thanks to =E5=AE=8B=E6=96=87=E6=AD=A6 for CCing= me. This problem has been discussed pretty much since Home was merged in Guix=C2=B9; we=E2=80=99ve all had ample time to think about it and to my kn= owledge this patch series is the only proposal that was ever brought. I=E2=80=99ll close this bug for clarity. I remain open to discussion on the implementation of System -> Home service mapping. I think further discussion should happen in the context of incremental changes to the implementation of that mapping mechanism, in a dedicated issue. Thank you, Ludo=E2=80=99. =C2=B9 The cover letter at mentions two services that would have been duplicated if we didn=E2=80=99t have this mechanism.