guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Merging wip-guix-home to master


From: Xinglu Chen
Subject: Re: Merging wip-guix-home to master
Date: Tue, 28 Sep 2021 17:23:57 +0200

On Tue, Sep 28 2021, Ludovic Courtès wrote:

> Xinglu Chen <public@yoctocell.xyz> skribis:
>
>> I noticed that the ‘guix home import’ subcommand is included, but I
>> think it needs more thought and feedback from people before it makes its
>> way into ‘master’; it also seems to lack documentation.
>
> Agreed.  There are a few (very few) exceptions, but in general each
> command needs (1) a section in the manual and (2) unit tests and/or
> integration tests in a shell script.
>
> Could you submit patches for that?

Sure!  :-)

> IWBN if others could do an after-the-fact review of the code, too.

Agreed.  I quickly skimmed through (gnu home-services xdg), and I can
already see some things that can be improved.  :-)

>> I just realized that it generates the following service declaration
>>
>> (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 will 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.
>> ‘guix home import’ clearly isn’t in a usable state as of right now…
>
> Also, I argued earlier against ‘slurp-file-gexp’:
>
>   https://lists.gnu.org/archive/html/guix-devel/2021-06/msg00192.html
>
> I haven’t checked the different service configuration APIs, but I think
> we should avoid uses of ‘slurp-file-gexp’ entirely and instead do the
> same as in the majority of Guix System services, which is to accept
> file-like objects.
>
> Thoughts?  Could you take a look?

Yeah, I never really liked ‘slurp-file-gexp’; using ‘local-file’ &
co. would be better and more consistent.

Attachment: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]