From: "Ludovic Courtès" <ludo@gnu.org>
To: Giacomo Leidi <goodoldpaul@autistici.org>
Cc: paren@disroot.org, 68857@debbugs.gnu.org, Andrew Tropin <andrew@trop.in>
Subject: [bug#68857] gnu: home: dotfiles: Avoid creating extra directory in $HOME.
Date: Mon, 04 Mar 2024 16:46:35 +0100 [thread overview]
Message-ID: <87bk7uf19g.fsf_-_@gnu.org> (raw)
In-Reply-To: <413c752eb714951dfe350517fd0f783710a26386.1709037308.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Tue, 27 Feb 2024 13:35:08 +0100")
Hi,
Giacomo Leidi <goodoldpaul@autistici.org> 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 refactoring home-dotfiles-configuration, renaming the
> directories field to a single directory, adding a new packages field to
> support GNU Stow's users workflow and introducing a new layout field to
> switch between the two directory layouts.
>
> * gnu/home/services/dotfiles (home-dotfiles-configuration): Migrate to
> (gnu services configuration);
> [directories]: rename to...;
> [directory]: ...this, new field;
> [packages]: new field;
> [layout]: new field;
> (strip-stow-dotfile): new variable;
> (strip-plain-dotfile): new variable;
> (home-dotfiles-configuration->files): use the new fields;
> [directory-contents]: allow for
> selecting a subset of application dotfile directories;
> * doc/guix.texi: document the new layouts.
>
> Change-Id: I2e96037608353e360828290f055ec5271cfdfd48
LGTM, but…
> - (directories home-dotfiles-configuration-directories ;list of strings
> - (default '()))
[...]
> + (directory
> + (string)
> + "The dotfiles directory where @code{home-dotfiles-service-type}
> +will look for application dotfiles.")
This is an incompatible change. Can we keep the old ‘directories’
field?
(Maybe this change is worthwhile, but it’s beyond the scope of this
patch series IMO, so I’d suggest discussing it separately.)
> (define-public home-dotfiles-service-type
> (service-type (name 'home-dotfiles)
> (extensions
> (list (service-extension home-files-service-type
> - home-dotfiles-configuration->files)))
> - (default-value (home-dotfiles-configuration))
> + (lambda (config)
> + (when config
> + (home-dotfiles-configuration->files config))))))
> + (default-value #f)
Better not provide a default value than provide one that is invalid. My
suggestion would be to remove the ‘default-value’ field here.
Apologies for the delays and thanks for your work and for your patience!
Ludo’.
next prev parent reply other threads:[~2024-03-04 15:47 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-31 22:15 [bug#68857] gnu: home: dotfiles: Avoid creating extra directory in $HOME paul via Guix-patches via
2024-01-31 22:17 ` [bug#68857] [PATCH] " Giacomo Leidi via Guix-patches via
2024-02-07 0:54 ` paul via Guix-patches via
2024-02-07 8:05 ` Janneke Nieuwenhuizen
2024-02-07 8:37 ` Janneke Nieuwenhuizen
2024-02-16 17:16 ` paul via Guix-patches via
2024-02-16 18:57 ` Sergey Trofimov
2024-02-16 17:17 ` [bug#68857] [PATCH v2] gnu: home: dotfiles: Properly support both plain and Stow directory layouts Giacomo Leidi via Guix-patches via
2024-02-20 9:37 ` [bug#68857] gnu: home: dotfiles: Avoid creating extra directory in $HOME Ludovic Courtès
2024-02-20 18:38 ` paul via Guix-patches via
2024-02-27 10:17 ` Ludovic Courtès
2024-02-27 11:30 ` Giacomo Leidi
2024-02-27 11:32 ` paul via Guix-patches via
2024-02-27 12:35 ` [bug#68857] [PATCH v3] gnu: home: dotfiles: Properly support both plain and Stow directory layouts Giacomo Leidi via Guix-patches via
2024-03-04 15:46 ` Ludovic Courtès [this message]
2024-03-06 20:51 ` [bug#68857] gnu: home: dotfiles: Avoid creating extra directory in $HOME paul via Guix-patches via
2024-03-06 20:52 ` [bug#68857] [PATCH v4] gnu: home: dotfiles: Properly support both plain and Stow directory layouts Giacomo Leidi via Guix-patches via
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
List information: https://guix.gnu.org/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87bk7uf19g.fsf_-_@gnu.org \
--to=ludo@gnu.org \
--cc=68857@debbugs.gnu.org \
--cc=andrew@trop.in \
--cc=goodoldpaul@autistici.org \
--cc=paren@disroot.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).