On 2022-02-08 10:46, Ludovic Courtès wrote: > Hi, > > Andrew Tropin skribis: > >>>> You can elaborate more on what you try to achieve and I can try to give >>>> you a recommendation how to implement it. >>> >>> I’d expect ‘home-files-service-type’ to do just that: add files to the >>> home directory, without trying to be smart. >>> >>> Would it make sense to distinguish between ‘home-files’ and (say) >>> ‘home-xdg-configuration-files’? >> >> Yep, I can do that, actually, it will be even better for the purpose I >> originally had. I'll make home-files to store files as it is and >> symlink manager not to add leading dots and a separate folder for >> xdg configs. > > Neat. > >> Ludo, Nick, what do you think about following names? >> ~/.guix-home/home-dir-files/ >> ~/.guix-home/xdg-config-dir-files/ > > I’d make it ‘…/home-files’ and ‘…/xdg-configuration-files’, but that’s a > detail. > >>> I’d also suggest removing special handling of HOME/files in >>> symlink-manager.scm. Relations between the various components of Guix >>> Home should preferably be made explicit via service extensions, and not >>> implicit through conventions like this ‘files’ sub-directory. >>> >>> Thoughts? >> >> Unfortunatelly, I don't know how to implement polymorphic behavior the >> other way with current extension mechanism, so I would prefer to keep >> this relation implicit, > > I’m not sure I follow but maybe I should try by myself to get a better > understanding. > > Thanks for your feedback! > > Ludo’. I decided to go one step at a time, and prepared a patch series, which: 1. Adds an explicit connection between home-files-service-type and symlink-manager by introducing a global constant used by both services. 2. Adds a home-xdg-configuration-files-service-type, which accepts a list of files for XDG_CONFIG_DIR, `(("mpv/mpv.conf" ,file-like-here)) 3. Migrates all (gnu home services) to xdg-configuration-files. 4. Make symlink-manager respect XDG_CONIFG_HOME and xdg-configuration-files-subdir. 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.