diff mbox series

bug#60521: [PATCH v7] home: Add home-dotfiles-service.

Message ID 877cjtf9y0.fsf@gnu.org
State New
Headers show
Series bug#60521: [PATCH v7] home: Add home-dotfiles-service. | expand

Commit Message

Ludovic Courtès Jan. 28, 2024, 9:02 p.m. UTC
Hi,

Giacomo Leidi <goodoldpaul@autistici.org> skribis:

> * gnu/home/services.scm: New file;
> (dotfiles-for-app): new variable;
> (home-dotfiles-configuration): new variable;
> (home-dotfiles-service-type): new variable.
> * gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
> * po/guix/POTFILES.in: Add it.
> * doc/guix.texi: Document it.
>
> Change-Id: I6769169cfacefc3842faa5b31bee081c56c28743
> Co-authored-by: Ludovic Courtès <ludo@gnu.org>

Committed with the change below (perhaps a mistake I had introduced
myself before) and with a slightly modified commit log.

I’m switching my laptop’s config now.  :-)

Thanks for all the work, and thanks for your patience!

Ludo’.

Comments

Giacomo Leidi Jan. 28, 2024, 9:14 p.m. UTC | #1
Hi Ludo' ,

that was an intentional fix I introduced after trying your code and 
having my home break :) . I just believe we are not aligned on the 
requirements. Does a tree -a call to your dotfiles directory resemble 
what is documented in the manual?

We either need to change the manual or the code, I don't have a clear 
preference . At this point I'm just happy this is in Guix but right now 
the manual matches Stow's usual directory layout. The code in this state 
contradicts the documentation and does not take into account the 
additional "git" directory given dotfiles directory that looks like this:

  tree -a dotfiles/
dotfiles/
└── git
     └── .gitconfig

2 directories, 1 file

Thank you for your time,

giacomo
Giacomo Leidi Jan. 28, 2024, 9:22 p.m. UTC | #2
If I can add this is [0] the layout that is documented in the manual, 
that Stow suggests and that I'm trying to implement. If you have 
something else in mind could you please share your layout?

Thank you

giacomo


[0]: https://gitlab.com/orang3/guix-home/-/tree/main/fishinthecalculator/etc
diff mbox series

Patch

diff --git a/gnu/home/services/dotfiles.scm b/gnu/home/services/dotfiles.scm
index 7226b6bcff..6a740c42ce 100644
--- a/gnu/home/services/dotfiles.scm
+++ b/gnu/home/services/dotfiles.scm
@@ -58,11 +58,8 @@  (define (import-dotfiles directory files)
 generated by recursively visiting DIRECTORY and mapping its contents to the
 user's home directory, excluding files that match any of the patterns in EXCLUDED."
   (define (strip file)
-    (string-join
-     (cdr
-      (string-split (string-drop file (+ 1 (string-length directory)))
-                    #\/))
-     "/"))
+    (string-drop file (+ 1 (string-length directory))))
+
   (define (format file)
     ;; Remove from FILE characters that cannot be used in the store.
     (string-append