From debbugs-submit-bounces@debbugs.gnu.org Wed Mar 09 07:50:22 2022 Received: (at 54293) by debbugs.gnu.org; 9 Mar 2022 12:50:22 +0000 Received: from localhost ([127.0.0.1]:58784 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRvli-0001Pd-AW for submit@debbugs.gnu.org; Wed, 09 Mar 2022 07:50:22 -0500 Received: from mail-tycjpn01olkn2064.outbound.protection.outlook.com ([40.92.99.64]:50926 helo=JPN01-TYC-obe.outbound.protection.outlook.com) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nRvlc-0001PE-7K for 54293@debbugs.gnu.org; Wed, 09 Mar 2022 07:50:17 -0500 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahvkKPVLHatWs/AlYsTcZzzf4rLyqSYjKuJU7/C3FtmTzLAiHkW1xGSeB3Iry5IBKKl50tjV0zt/cCvb8DR3H43VQPi64NSiZgAjofI1XyxEJ89AwEurS02eFAaBlL9kf73xOBzza4zeNEjw7lUBmXUcQfgSaRMwegvvk5exMmxOU0p5AO5gUMynwQ+Tr6vSKakg43+im+y9KBYMliDdakVpIc1cVrzQ1+S02qBVwDDLxxMzSH82c/sIkdPCik+jZ/aYHs8gh3AU4aEAnD7pEzycyl0GgQqkhlDYTobstmg4Fcsi8t/y7XNLeLjSzAKTG9m1DGAv4BJI6bvu2lJUoQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=oCyZkkZSHG1nuxFcOyCTASFSh190WwR8yBbX3hX1BoY=; b=UMXIDp0aj3u8/a+EsqJzQ1EIrcNHvs3ulnYsJSmxlO4db2XPz4Gy3t6zWNau2a3OjtVNSWZbTKjAqSInnuoOZjRzrgrozcU5nyFnODfMICCB07T0GP7GWw7CjdwCrx0Yq9lXsj2yyn0egWRwZl7MrU3h+WXPHf5w0BXqsg+ZBHhQxMTA+DENGckhr5ruoOYke1Z3ke/FVUMKTqpLEheefJJi5jnBl8dW8aO3uvji1TXI7zJfvn6sdSmr8Qd+vpZ8kN5pu72Q5xDOEBONnm1V29EfEV2+2AFT42bY9RF2Bziyed8xVItM5oBKhVWTNaqEgHBfYE4zQPBvZGMNlYxfWw== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=none; dmarc=none; dkim=none; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=outlook.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=oCyZkkZSHG1nuxFcOyCTASFSh190WwR8yBbX3hX1BoY=; b=lji6wfZDTe1DcEerhAV5Ddpafm1stBtrTt+cYM/IWbOI5SPLjozt3ySElE2vE0iYByCDIA9/j6lUlU1A/xXr7IUoU19qOlE+/236Txpu17nwy49vVjqzB6KWLCIZdSAJiyexumEnN2onL70XkaHS52Yzmgu9V5bppTAZTfX1tvDgS3SM2hn9N3bMUl6x0NErLYt8zKgrB7/BG86qlpqi/2n9zVufcTTm45B2p/5f9NmtwOKYsEwmM68hGc6n57cXrRrrZ1NFof4224vEO6iaPEGny4zamoKe1ai1isZISznUF8ajjiXvuN0fNCKApH1u0rYL1TSL3OBUomR+o1eLYw== Received: from TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:11e::13) by OSZP286MB2305.JPNP286.PROD.OUTLOOK.COM (2603:1096:604:187::11) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5038.14; Wed, 9 Mar 2022 12:50:04 +0000 Received: from TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM ([fe80::51f5:8561:6bc0:1f64]) by TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM ([fe80::51f5:8561:6bc0:1f64%5]) with mapi id 15.20.5038.027; Wed, 9 Mar 2022 12:50:04 +0000 From: =?utf-8?B?5a6L5paH5q2m?= To: Maxime Devos Subject: Re: [bug#54293] [WIP] home: Add home-git-service-type References: <4802fd5bd14e6d73ca8205edab1e38580db7dd0c.camel@telenet.be> Date: Wed, 09 Mar 2022 20:50:06 +0800 In-Reply-To: <4802fd5bd14e6d73ca8205edab1e38580db7dd0c.camel@telenet.be> (Maxime Devos's message of "Mon, 07 Mar 2022 19:11:16 +0100") Message-ID: User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-TMN: [L0JBa6jxaKSMHk5OyOnfi8Lw1glQgv+YH2TFvWKut3HVMB6MQ7x8P5fvXslU9xcK] X-ClientProxiedBy: HK2PR02CA0153.apcprd02.prod.outlook.com (2603:1096:201:1f::13) To TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM (2603:1096:400:11e::13) X-Microsoft-Original-Message-ID: <87mthz2su9.fsf@outlook.com> MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-Office365-Filtering-Correlation-Id: 3a113fb2-3e0b-4755-21fa-08da01cb5526 X-MS-TrafficTypeDiagnostic: OSZP286MB2305:EE_ X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 4nvGUn+y/D/oX5Bj9BYwvBGDxE/JCYaGVy2VUzlNV7fb+gwnZC0mkuYu4RD3+W656GYRyJWWGd0pQT9r/WUUuhz5AgkhTSoNu5J/tklpSCtm4ZyaZDzMiGW2E3LDyXSLpfuHFWvNkprn/Qh8gYorprj/eRB0fcjF9/5IZDhLgCcPWDjg74x9cJKOeqTmbnjN5sDkRg8nZ0uvj4VL/ZXb7pLic7I25BZ24nwN6N/jW8NWVBuZHej3RDTvSvIG3XjHajFVS25siL4vIel9+mllx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ook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3a113fb2-3e0b-4755-21fa-08da01cb5526 X-MS-Exchange-CrossTenant-AuthSource: TYCP286MB1897.JPNP286.PROD.OUTLOOK.COM X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 09 Mar 2022 12:50:04.7238 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 84df9e7f-e9f6-40af-b435-aaaaaaaaaaaa X-MS-Exchange-CrossTenant-RMS-PersistedConsumerOrg: 00000000-0000-0000-0000-000000000000 X-MS-Exchange-Transport-CrossTenantHeadersStamped: OSZP286MB2305 X-Spam-Score: -0.0 (/) X-Debbugs-Envelope-To: 54293 Cc: 54293@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) (lines begin with '>>' are from my previous mail.) Maxime Devos writes: >> I made 'options' an sexp value since there are so many git options >> (see 'man git-config'). > This can be solved with an escape hatch like openssh-configuration's > 'extra-content' and by adding support for new options on an on-demand > basis. If there are lots of options, that just means there's lot to > do, I think. > [...] > Instead of this ad-hoc alist structure, how about introducing some > structure with records, like done for other Guix services, e.g. > 'openssh-configuration' and 'guix-configuration'? > [...] > To elaborate a little, I think the following options are the most > important to support: > user.name, user.email, commiter.name, committer.email > smtp things (for git send-email, important for contributing to guix) > pgp things (important for being a committer in guix) Yes, add a proper record structure will make documentation and type check more viable. I'll try later.. >> I can also symlink the generated gitconfig into ~/.gitconfig, but >> with 'GIT_CONFIG_SYSTEM' it can be used together with hand maintained >> ~/.gitconfig. > The GIT_CONFIG_SYSTEM is less stateful, I like it. There are multiple > variables like these though: GIT_CONFIG_GLOBAL, GIT_CONFIG_SYSTEM and > GIT_CONFIG. My guess is that GIT_CONFIG_GLOBAL would be appropriate > here. Set GIT_CONFIG_GLOBAL will shadow ~/.gitconfig, while GIT_CONFIG_SYSTEM is applied before ~/.gitconfig, so that user can have some out-of guix managed options in ~/.gitconfig if they really want (maybe password?). > =E5=AE=8B=E6=96=87=E6=AD=A6 schreef op ma 07-03-2022 om 22:51 [+0800]: >> Hello, with: >> --8<---------------cut here---------------start------------->8--- >> (service home-git-service-type >> =C2=A0(home-git-configuration >> =C2=A0 (options '((user (name "foo") >> =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0= =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (email "foo@bar.com")))))) [...] > > How about providing an option for passwords? E.g., > > (home-git-configuration > (user (git-user-info > (name "Foobar") > (e-mail "Foobar ") > (signing-key "some PGP fingerprint))) > (secrets-file "/home/foo/the-password") > (smtp (git-smtp-configuration > #;(password "12345") ; not recommended, use 'secrets-file' ins= tead > ...)) > > (with some appropriate documentation) > > secrets-file (not interned in the store): > =20 > # I don't remember the exact option name > smtp.password =3D Foobaz > > the produced .gitconfig would include a line > > [include] > path =3D /home/foo/the-password Um, I can get it with sexp options: --8<---------------cut here---------------start------------->8--- (options '((include (path "/home/foo/the-password")) (include (path "/home/foo/another-file")))) --8<---------------cut here---------------end--------------->8--- Or if with proper record fields, I'd like to keep the original git variables names in scheme too: --8<---------------cut here---------------start------------->8--- (user.name "Foobar") (user.email "foo@bar.com") (include.path (list "/home/foo/the-password" "/home/foo/another-file")) (sendemail.smtpPass "12345" ) --8<---------------cut here---------------end--------------->8--- But with record field name, I don't know how to encode variables with subsection (eg: url..insteadOf): [url "https://mirror.sjtu.edu.cn/git/guix.git"] insteadof =3D https://git.savannah.gnu.org/git/guix.git The subsection name may not be a valid scheme variable name... I'll update this patch with adding doc and proper record fields for some important options later, thank you!