From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id 0PVlLi7N0GOX+gAAbAwnHQ (envelope-from ) for ; Wed, 25 Jan 2023 07:33:18 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id eGeTLS7N0GMkvwAAG6o9tA (envelope-from ) for ; Wed, 25 Jan 2023 07:33:18 +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 66D1911B78 for ; Wed, 25 Jan 2023 07:33:17 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pKZLE-0002Dk-RW; Wed, 25 Jan 2023 01:33:04 -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 1pKZLC-0002Db-GG for guix-patches@gnu.org; Wed, 25 Jan 2023 01:33:02 -0500 Received: from debbugs.gnu.org ([209.51.188.43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pKZLB-0008Vq-T6 for guix-patches@gnu.org; Wed, 25 Jan 2023 01:33:01 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1pKZLB-0005ua-O9 for guix-patches@gnu.org; Wed, 25 Jan 2023 01:33:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#60521] [PATCH] home: Add home-stow-migration-service. Resent-From: Andrew Tropin Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 25 Jan 2023 06:33:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 60521 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: Giacomo Leidi , 60521@debbugs.gnu.org Received: via spool by 60521-submit@debbugs.gnu.org id=B60521.167462836322697 (code B ref 60521); Wed, 25 Jan 2023 06:33:01 +0000 Received: (at 60521) by debbugs.gnu.org; 25 Jan 2023 06:32:43 +0000 Received: from localhost ([127.0.0.1]:58111 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKZKs-0005u1-VI for submit@debbugs.gnu.org; Wed, 25 Jan 2023 01:32:43 -0500 Received: from relay1-d.mail.gandi.net ([217.70.183.193]:34409) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1pKZKq-0005tm-26 for 60521@debbugs.gnu.org; Wed, 25 Jan 2023 01:32:40 -0500 Received: (Authenticated sender: andrew@trop.in) by mail.gandi.net (Postfix) with ESMTPSA id A4C1F240004; Wed, 25 Jan 2023 06:32:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=trop.in; s=gm1; t=1674628354; 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: in-reply-to:in-reply-to:references:references; bh=Ldlz+onYxrGIuwdV6KynHYdVCBTh3EgZsq9wDX0tAuw=; b=JNBRTxDeR+omAV37jqKB3+odw+lVvl0XHOicHrC5wa5yMGz+vG3Lrbb8eeXXER5gnR6a5P XcaC1tTNkrffzj2AKdVhKVuyS36Bzr7FVWy0OwwtfIfV+ZMcmAHD1NfwGTMbRCENwbHovN COftjjmsYabMWeQDfP+Tr7qTiqsNwfMXwUWg7XMuUFvg9Q5pk/bmuHmN5a/rfRdUeX0b6R Rg9/Vlx+2ARpd+o1T3VINrfmuxZwcKj0i40Vs1ShMOnigs+vMVGa8qDiChzu+IbERWZrDY O9UB9hMS290qAA1KTvLqI/4CVPJgdwg62lUpiJshm3N6mVv4CV0aQ3Bi7Hz4Nw== From: Andrew Tropin In-Reply-To: <87edrl4kio.fsf@gnu.org> References: <0a8d7bce31856292baa06a08260494c0@autistici.org> <20230103165534.25644-1-goodoldpaul@autistici.org> <87o7qxi9ym.fsf_-_@gnu.org> <87tu0p89wf.fsf@trop.in> <87edrl4kio.fsf@gnu.org> Date: Wed, 25 Jan 2023 10:32:29 +0400 Message-ID: <874jsft98i.fsf@trop.in> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" 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 ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1674628397; 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: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=Ldlz+onYxrGIuwdV6KynHYdVCBTh3EgZsq9wDX0tAuw=; b=oiK+nWAE0kyiElh1UgpxzHsatf8LRsqOBHwjd8tez06bydRTMdnobohwSOOjbo6sIM6LUi AYz8u/2Z0I54Cg0K7TAUwbsyFb1zK1LHp7FB2q1qa2DGUpQD7f0gyRC2jS0SXHTKBg9fgZ SLk8Mz5geUiWT6uGzcouZ/opMeNHJVQOHDmjd+oCWdi6C7s7fP2jLXQUFRJ/LXjMv16y3p n94Exv+sGPu6nUPJK2o6Q+bWDL53Wti8Gnv9pLu6rKnoxLjJXI0QGbz4Mcovhh3XR3fTln jZYZQp4NwgZ6aOJ+IxXDIO57iB9JSmRazJf33AZiMy6VlB1kvA2go56mAPiNDA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=JNBRTxDe; 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=none ARC-Seal: i=1; s=key1; d=yhetil.org; t=1674628397; a=rsa-sha256; cv=none; b=L+laFeZJGSiX0sNn42a0nal9rgD2dVU2/SgAGQamILzbWc2gz0detkVOVHJ7dBhQ0weSqU SKmBCoMsymk5vMIPMQt5bHa/HVVUi9bQ3RFmoNaV/6g0VbLo3QXprwwEhSgheDAd89mG+h xoK/jIi1ucoqbidv4csxajho7ijB17rDbpui317QP2tvJVpgiwGWgTq2e/yVAugKHmL2gB DFGYiGGzJTiJP3D0oMQ1k5yenKKFHr2zaZAoHOFuBCm4TvkakdZzVUOa3Ntn56sP4utfzx gAtp1qMi1hp7IJ2pPPPTXZsotay9VOjN4+7SeVGv+7+d+lLwYBCxPxn/2b1SKQ== X-Migadu-Scanner: scn1.migadu.com Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=trop.in header.s=gm1 header.b=JNBRTxDe; 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=none X-Migadu-Spam-Score: 0.23 X-Spam-Score: 0.23 X-Migadu-Queue-Id: 66D1911B78 X-TUID: AauD+LF4BMEy --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 2023-01-23 11:23, Ludovic Court=C3=A8s wrote: > Hi, > > Andrew Tropin skribis: > >>>> +A suitable configuration would then be: >>>> + >>>> +@lisp >>>> + (home-stow-migration-service >>>> + (string-append (getenv "HOME") >>>> + "/.dotfiles")) >>>> +@end lisp >> >> The service looks neat! Thank you, Giacomo. >> >> Ludo, wouldn't it be better and safer to use (local-file "./dotfiles" >> #:recursive? #t) here? I find it kinda dangerous for reproducibility to >> reference local files and make logic inside the service to depend on it. > > Currently I don=E2=80=99t think that=E2=80=99s possible because the servi= ce imports > those files at configuration time, but the end result is the same: those > dot files are copied to the store and that=E2=80=99s what=E2=80=99s refer= enced. > > I think it=E2=80=99s okay like this, but I don=E2=80=99t have a strong op= inion. > > That said, from a usability viewpoint, it does mean that users would > typically have to version-controlled directories (one with the Home > config file, and one with the Stow-style dot file tree), which is not > great. Perhaps the manual could say something about it. > The long-term idea I have is to provide a hermetic evaluation mode (not only for home environments, but for guix in general), which allows to make sure programmatically that all files referenced comes from either origins with hash explicitly specified or commited in the current vcs repository. This way by changing things like (local-file "./dotfiles" #:recursive? #t) to something like (file-append (current-repo) "/dotfiles") or (vcs-file "dotfiles" #:recursive? #t) we will be able to guarantee that one didn't forget to copy all needed dependencies for the configuration and to keep API "future compatible" looks like a good idea. Just thinking out loud, someday will make a separate thread/note/prototype on this topic.=20=20 Anyway, this service looks good enough to me with the current implementation and seems potentially helpful. =2D-=20 Best regards, Andrew Tropin --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEKEGaxlA4dEDH6S/6IgjSCVjB3rAFAmPQzP0ACgkQIgjSCVjB 3rAy0g//fVupV4O+bUINCEZFcfV8sPddnl89rEdJ9nISb/XlcHEiMMqRZ9x8d2mk tLGU/SlW9ZydZn5UQCGt5WsXFR0O9Pc1lpJCcBhOVudbNpR7c+FDBMd5KhfeSEae paYeT1w6UtD+rhKU2n6Y8cNDa8YmYwWvz1XQBU56nsRZlVRN76n4522fLAw4QgeQ QspAdPhY91V13+cAGrbc6ksNfzCM/n9M+sCnN9kH+scpawBIkLR5UboFvtGOSWGY MPVWzLVA7EXcGX8mZb+bIyEDSRfLAPFYhOG1HZ3cCjbnPaZ1nnEDfy/uJuJLqYKj nh6ryD66ErdL3r4O52ycqSg9DAT+3MEBPvRzwp8kBJW2ynKbMjNNtsGf22g/C+tN KyR22U3V1I9Jgh8uzLRzMxAcwuhLYLVM8nDVjU3bfxwbm384+AjAjm7kb4nJXZWH S4f18MvZ8lqvJr/zDdscgxomlNKXe7pnnoDpcqkYF7RiEbFCu+62iTuL7t4B1Y6j o8DO60BMGnx3pHCb3sMljimIcMpeGGH4ooDIEHSkPURy9ocmS2VjEikwRP2E09Zc 1x8yEpK8i3GgIwv1XBoaoNc5Rs/rYpwHo87KWTShSpYzZwZXnzI/keDddzg0Jb+Q iRnjRA7oR9m+AW0A3jDwufAZkd/Hcf6bhzcUf8Fd01Cfz50cYoE= =jT1l -----END PGP SIGNATURE----- --=-=-=--