GNU bug report logs -
#50873
[PATCH 0/5] Fixes to ‘guix home import’
Previous Next
Reported by: Xinglu Chen <public <at> yoctocell.xyz>
Date: Tue, 28 Sep 2021 17:34:02 UTC
Severity: normal
Tags: patch
Done: Ludovic Courtès <ludo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #86 received at 50873 <at> debbugs.gnu.org (full text, mbox):
[Message part 1 (text/plain, inline)]
Hi, (sorry for taking so long to get to this!)
On Wed, Oct 13 2021, Ludovic Courtès wrote:
> Hello,
>
> Xinglu Chen <public <at> yoctocell.xyz> skribis:
>
>> Copy the appropriate the relevant configuration files to the destination
>> directory, and call ‘local-file’ on them.
>>
>> Without this, ‘guix home import’ will generate a service declaration like this
>>
>> (service
>> home-bash-service-type
>> (home-bash-configuration
>> (bashrc
>> (list (slurp-file-gexp
>> (local-file "/home/yoctocell/.bashrc"))))))
>>
>> but when running ‘guix home reconfigure’, the ~/.bashrc file would be moved, so
>> when running ‘guix home reconfigure’ for the second time, it would read the
>> ~/.bashrc which is itself a symlink to a file the store.
>
> Ooh, good catch!
>
>> * guix/scripts/home/import.scm (%destination-directory): New parameter.
>> (generate-bash-module+configuration): Adjust accordingly.
>> (modules+configurations): Copy the user’s configuration file to
>> ‘%destination-directory’.
>> * guix/scripts/home.scm (process-command): Adjust accordingly; create
>> ‘%destination-directory’ if it doesn’t exist.
>
> [...]
>
>> +(define %destination-directory
>> + (make-parameter (string-append (getenv "HOME") "/src/guix-config")))
>
> Instead of making it a parameter, with a default value that looks fishy
> but is never actually used :-), can we make it an explicit parameter of
> ‘generate-bash-module+configuration’?
Ah, that would be a good idea. :-)
[signature.asc (application/pgp-signature, inline)]
This bug report was last modified 3 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.