bug#52808: Guix home should not assume that all targets are dot files

2022-03-10 Thread Andrew Tropin
On 2022-03-05 23:44, Ludovic Courtès wrote:

> Hi Andrew,
>
> The patches reached my mailbox around the time I went on vacation and
> then fell through the cracks.  Sorry about that!
>
> Andrew Tropin  skribis:
>
>> After that patch series is merged we can give a time for users to
>> migrate their self-made home services to xdg-configuration-files and
>> after for example 2 weeks, remove special handling of dots for
>> home-files.
>
> Sounds like a plan!
>
>> From 0cd37bbc724f9c793898c2655bdd1c335045c5f0 Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin 
>> Date: Fri, 11 Feb 2022 10:55:01 +0300
>> Subject: [PATCH 1/5] home: Explicitly connect home-file and symlink-manager
>>  services.
>>
>> * gnu/home/services.scm (home-files-directory): New variable.
>> * gnu/home/symlink-manager.scm (update-symlinks-script): Use
>> home-files-directory variable from (gnu home services).
>
> [...]
>
>> -(description "Configuration files for programs that
>> -will be put in @file{~/.guix-home/files}.")))
>> +(description (format #f "Files that will be put in
>> +@file{~~/.guix-home/~a}, and further processed during activation."
>> + home-files-directory
>
> This hunk would prevent i18n so I suggest dropping it (you can mention
> ‘home-files-directory’ in a margin comment for good measure).
>
> Otherwise LGTM.
>

Done.

>
>> From 23f7095d60b18b52de0d1aa314c4012cdf55a046 Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin 
>> Date: Fri, 11 Feb 2022 11:03:02 +0300
>> Subject: [PATCH 2/5] home: Add home-xdg-configuration-files service.
>>
>> * gnu/home/services.scm (home-xdg-configuration-files): New variable.
>
> [...]
>
>> +(define xdg-configuration-files-subdir "config")
>>
>> +(define (xdg-configuration-files files)
>> +  (map (lambda (lst)
>> + (cons (string-append xdg-configuration-files-subdir
>> +  "/" (car lst)) (cdr lst)))
>> + files))
>
> I’d just call it “.config” (instead of “config”).  That way, there
> wouldn’t be any special treatment.  WDYT?

Will be done in next patch series.

>
> Also: s/subdir/directory/, and please use ‘match’ instead of car/cdr
> (info "(guix) Coding Style").

Done, done.

>
>
>> +(description (format #f "Files that will be put in
>> +@file{~~/.guix-home/~a/~a}, and further processed during activation."
>> + home-files-directory
>> + xdg-configuration-files
>
> Same as above: drop ‘format’ and write ~/.guix-home/files/.config.
>

Done.

>
>> From 11f23a48d480a91d6bfba0ff55c1a9831585a4ee Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin 
>> Date: Fri, 11 Feb 2022 15:03:44 +0300
>> Subject: [PATCH 3/5] home: shells: Migrate zsh to xdg-configuration-files.
>>
>> * gnu/home/services.scm (home-zsh-service-type): Additionally extend
>> home-xdg-configuration-files-service-type.
>
> [...]
>
>> From ef4c3bbcc0c8c1a251f4ad6c494f8ed30adf45f2 Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin 
>> Date: Fri, 11 Feb 2022 15:34:46 +0300
>> Subject: [PATCH 4/5] home: Migrate fountutils and xdg modules to
>>  xdg-configuration-files.
>>
>> * gnu/home/services/fontutils.scm (home-fontconfig-service-type): Migrate to
>> xdg-configuration-files.
>> * gnu/home/services/xdg.scm (home-xdg-user-directories-service-type,
>> home-xdg-mime-applications-service-type): Migrate to xdg-configuration-files.
>
> Neat!
>
>> From 089683bbd301f6e085f00fbd53713f335abac40e Mon Sep 17 00:00:00 2001
>> From: Andrew Tropin 
>> Date: Fri, 11 Feb 2022 16:14:23 +0300
>> Subject: [PATCH 5/5] home: symlink-manager: Respect XDG_CONFIG_HOME during
>>  activation.
>>
>> * gnu/home/services/symlink-manager.scm (update-symlinks-script): Respect
>> XDG_CONFIG_HOME during activation.
>
> I propose to postpone this one after
> , and I even offer to rebase it
> myself if you want.  :-)
>
> Could you send updated patches?
>
> Thanks in advance, and apologies again for the delay!
>
> Ludo’.

Added two minor patches for symlink-manager.

From 3a6dc64d3366aa37507c83c598cbddb0f0815b6d Mon Sep 17 00:00:00 2001
From: Andrew Tropin 
Date: Fri, 11 Mar 2022 08:43:04 +0300
Subject: [PATCH 1/2] home: symlink-manager: Use existing home-directory
 symbol.

* gnu/home/services/symlink-manager.scm (update-symlinks-script): Use
existing home-directory symbol instead of additional getenv call.
---
 gnu/home/services/symlink-manager.scm | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/gnu/home/services/symlink-manager.scm b/gnu/home/services/symlink-manager.scm
index 767b1bdc01..bce5c85b56 100644
--- a/gnu/home/services/symlink-manager.scm
+++ b/gnu/home/services/symlink-manager.scm
@@ -185,7 +185,7 @@ (define (source-file file)
 
  #$%initialize-gettext
 
- (let* ((home (string-append (getenv "HOME") "/.guix-home"))
+ (let* ((home (string-append home-directory "/.guix-home"))

bug#52808: Guix home should not assume that all targets are dot files

2022-03-10 Thread Ludovic Courtès
Hi Andrew,

Andrew Tropin  skribis:

> On 2022-03-05 23:44, Ludovic Courtès wrote:

[...]

>> I propose to postpone this one after
>> , and I even offer to rebase it
>> myself if you want.  :-)
>>
>> Could you send updated patches?
>
> Sure, I even replied to bug#54180 ticket :)  Waiting for the merge, after
> that will update patches to address your comments and will rebase them
> on top of bug#54180.  Also, I need to update the manual as well.

Oh sorry, I had misunderstood your comment in
.

I’ve now pushed it so you can happily rebase.  :-)

Thanks,
Ludo’.





bug#54305: disk utility fail format fat

2022-03-10 Thread Liliana Marie Prikler
Hi Roman,

Am Mittwoch, dem 09.03.2022 um 02:27 +0200 schrieb Roman Riabenko:
> 2. GNOME Disks utility ignored the dosfstools package which I installed
> in my user profile. For comparison, this applies to ntfs-3g too. In
> relation to ntfs-3g with UDisks this seems to be expected behavior, but
> it seemed to me as a bug at first:
> https://guix.gnu.org/en/manual/devel/en/html_node/Desktop-Services.html#index-udisks_002dservice
> 
> I do not know what is necessary to make GNOME Disk utility recognize
> the tools in the user profile and I am not sure it is necessary. It
> just seemed against the spirit of guix that the user is forced to
> reconfigure the system.
GNOME Disks inherits UDisks' limitations, as it uses it under the hood.
With that in mind...

> 1. The FAT option was not grayed out in the formatting dialog. For
> comparison, the NTFS option was grayed out until I added ntfs-3g to
> the system profile too. May be GNOME Disks expects mkfs.vfat to be
> present, so it does not check whether it is present like it does for
> other file systems. 
> 
> So, it would be great for GNOME Disks to check whether mkfs.vfat is
> available before proceeding like it does for other filesystems.
You should probably report this one upstream.  A fix would be
relatively simple to write, see [1] for the relevant line making the
Windows button insensitive.  The procedure
"gdu_utils_is_ntfs_available" spans only a few lines of code and could
easily be adapted to check for vfat instead.

Cheers

[1]
https://gitlab.gnome.org/GNOME/gnome-disk-utility/-/blob/40.2/src/disks/gducreatefilesystempage.c#L209