From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id QIBSAcTx1GVcfQEAqHPOHw:P1 (envelope-from ) for ; Tue, 20 Feb 2024 19:39:00 +0100 Received: from aspmx1.migadu.com ([2001:41d0:403:58f0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0.migadu.com with LMTPS id QIBSAcTx1GVcfQEAqHPOHw (envelope-from ) for ; Tue, 20 Feb 2024 19:39:00 +0100 X-Envelope-To: larch@yhetil.org Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b="U/iZHJxl"; 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=1708454339; h=from:from:sender:sender:reply-to: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=EDoRqsb6NtegefhnC7jomG1czPzQcB9MojNbN3hoqRM=; b=SqSztPcOlW6JGZ+pZfARhEsCNgWy2XltcaP57Xv1i1+fZluD3n/kw8ekgkYETIUjwXufZ7 jrpQ1CtcJyoXoi0Ni3+s8d6+7aWOzMEVwGTGVmH1l+NReJ/Dw0w71WaoVRIAnxAaaTxGs1 JyMJP4N0KzFVyKzNVtw2vAha3HiL7Txp1k0uUTA3lpmzEvsXyaSokMD+skvdsIsLUm2D1V /H12+iWh8uuVZNktdUVfn9tRaHiQZMrB/3gp7avY1H1DXD0iGrkr1wNV57zazpiAIdRbyM AWz2Z2PdXVoLHDB8WGU7k1obDJVeXH9KsMjh6loPnwNd97KNEuePqvxHxuNOHQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=autistici.org header.s=stigmate header.b="U/iZHJxl"; 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-Seal: i=1; s=key1; d=yhetil.org; t=1708454339; a=rsa-sha256; cv=none; b=l9w3iA3Frlo9Rv9ZQbgO8fXFcl6Zbz8kNcGJOe/Gtau+YSkPLHLxgblwLHSN8BK/Ne3Fif N3dw7vwI40lModOdDAkt3QQMVPGgmNrDHHT1jgavBxDtJNQSs7Wlox9wmF+g+A8I+hOOpP 3Uaf2LjAOcLf9Ydaf+UjGPUKsdxkOuyS5OJpKJ5wGFdmfum4fstAuZ+knHzJCJWfhvpEx6 hkr7o1eb+eAUKcKjl9d/rKhYJImyotfBaha5BzPKqPCbry5ujUoIkb87cHeIkYKeW16D/e 7j2856GsoWJh0GKh4Wy4PJxe1BxOzoKV8Ux6BymiOXXcodNq3cfvFb5WX+YnMA== 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 B31023AEFB for ; Tue, 20 Feb 2024 19:38:59 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rcV0s-0005p4-VS; Tue, 20 Feb 2024 13:38:42 -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 1rcV0q-0005og-BG for guix-patches@gnu.org; Tue, 20 Feb 2024 13:38:40 -0500 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 1rcV0q-0006a1-22 for guix-patches@gnu.org; Tue, 20 Feb 2024 13:38:40 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rcV1B-0000rt-MQ for guix-patches@gnu.org; Tue, 20 Feb 2024 13:39:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#68857] gnu: home: dotfiles: Avoid creating extra directory in $HOME. Resent-From: paul Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 20 Feb 2024 18:39:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 68857 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 68857@debbugs.gnu.org Received: via spool by 68857-submit@debbugs.gnu.org id=B68857.17084543163298 (code B ref 68857); Tue, 20 Feb 2024 18:39:01 +0000 Received: (at 68857) by debbugs.gnu.org; 20 Feb 2024 18:38:36 +0000 Received: from localhost ([127.0.0.1]:46546 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcV0m-0000r8-9M for submit@debbugs.gnu.org; Tue, 20 Feb 2024 13:38:36 -0500 Received: from confino.investici.org ([93.190.126.19]:51879) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rcV0h-0000qt-J4 for 68857@debbugs.gnu.org; Tue, 20 Feb 2024 13:38:34 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1708454281; bh=EDoRqsb6NtegefhnC7jomG1czPzQcB9MojNbN3hoqRM=; h=Date:Subject:To:Cc:References:From:In-Reply-To:From; b=U/iZHJxl+jQYtYw5xyszPsUytbSXNO89HeF05Hbp16pSk+XVezKEwmh1mzYrv345a 55OzuPrWO1EwzsBl4YB2LrNsIpy5CGqRAm9+AiJh4yBdvj7ZCXcgcIpxrSac6puYQ5 nBDr7Iv6tE0Tcx8xmZp5MvMlufjbkdJGVVotsOHg= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4TfSp12J3wz119q; Tue, 20 Feb 2024 18:38:01 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4TfSp10Vghz119n; Tue, 20 Feb 2024 18:38:01 +0000 (UTC) Message-ID: <24f9f59a-79e8-27bc-5fe4-da160ed64187@autistici.org> Date: Tue, 20 Feb 2024 19:38:00 +0100 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.15.0 Content-Language: en-US References: <14bc720d-7fdc-516a-3018-58294c1cafcd@autistici.org> <20240216171724.22171-1-goodoldpaul@autistici.org> <87msrvmq7v.fsf_-_@gnu.org> In-Reply-To: <87msrvmq7v.fsf_-_@gnu.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit 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: , Reply-to: paul X-ACL-Warn: , paul via Guix-patches From: paul via Guix-patches via Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: guix-patches-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN X-Migadu-Spam-Score: -6.08 X-Spam-Score: -6.08 X-Migadu-Queue-Id: B31023AEFB X-Migadu-Scanner: mx11.migadu.com X-TUID: C+MWyFrdywtm Hi Ludo’ , On 2/20/24 10:37, Ludovic Courtès wrote: > Hello Giacomo! > > Giacomo Leidi skribis: > >> The current implementation of the home-dotfiles-service-type contradicts >> the Guix manual (see https://issues.guix.gnu.org/68848 ). This patch >> properly implements both the plain and Stow dotfiles directory layouts. >> >> It does so by creating a new record type for each directory layout. This >> approach, compared to having a single field in >> home-dotfiles-configuration, >> allows for having different layouts for different directories and to >> carry additional information that might be required for some layouts. >> >> Implementing a new layout should just be a matter of creating a new >> record type, defining a strip-*-dotfile procedure and plugging them into >> the home-dotfiles-service-type. >> >> * gnu/home/services/dotfiles (home-dotfiles-stow-directory): New >> variable; >> (home-dotfiles-plain-directory): new variable; >> (home-dotfiles-configuration): migrate to (gnu services configuration); >> (strip-stow-dotfile): new variable; >> (strip-plain-dotfile): new variable; >> (home-dotfiles-configuration->files): use the new record types; >> [directory-contents]: allow for >> selecting a subset of application dotfile directories; >> * doc/guix.texi: document the new layouts. >> >> Change-Id: I2e96037608353e360828290f055ec5271cfdfd48 > Thanks for working on it! > >> +There are two supported dotfiles directory layouts, for now. The >> +@code{home-dotfiles-plain-directory} layout, which is structured as follows: >> + >> +@example >> +~$ tree -a ./dotfiles/ >> +dotfiles/ >> +├── .gitconfig >> +├── .gnupg >> +│ ├── gpg-agent.conf >> +│ └── gpg.conf >> +├── .guile >> +├── .config >> +│ ├── guix >> +│ │ └── channels.scm >> +│ └── nixpkgs >> +│ └── config.nix >> +├── .nix-channels >> +├── .tmux.conf >> +└── .vimrc >> +@end example > I’d add a sentence like: “This tree structure is installed as is to the > home directory upon @command{guix home reconfigure}.” I'm adding this to the manual, thanks! >> +(define-configuration/no-serialization home-dotfiles-configuration > I think we should keep ‘home-dotfiles-configuration’ for compatibility > (this patch keeps the exports but removes the actual > definition IIUC). We are keeping home-dotfiles-configuration , it's just now it is implemented with validation from (gnu services configuration) . The only thing changing is that home-dotfiles-configuration's directories field is now a list of either home-dotfiles-plain-directory or home-dotfiles-stow-directory records. > Also, as a rule of thumb, the configuration of a given service type is > usually monomorphic (always the same configuration record type), which I > find clearer. > > Instead of having these two record types, would it be an option to add a > ‘type’ field (or similar) to , as discussed > earlier? As I tried explaining in the commit message, this approach, compared to having a single field in home-dotfiles-configuration , allows for having different layouts for different directories and to carry additional information that might be needed for a given layout type. Such as the application field required to support some Stow's users workflows. What do you think about this approach? It should be general enough to support any kind of layout. Thank you for your time, giacomo