unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Xinglu Chen <public@yoctocell.xyz>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: guix-devel@gnu.org, Andrew Tropin <andrew@trop.in>
Subject: Re: Merging wip-guix-home to master
Date: Tue, 28 Sep 2021 17:23:57 +0200	[thread overview]
Message-ID: <87mtnw4tbm.fsf@yoctocell.xyz> (raw)
In-Reply-To: <87ee98c1kx.fsf@gnu.org>

[-- Attachment #1: Type: text/plain, Size: 1865 bytes --]

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 #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 861 bytes --]

      reply	other threads:[~2021-09-28 15:24 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-23  9:53 Merging wip-guix-home to master Andrew Tropin
2021-09-23 15:27 ` Katherine Cox-Buday
2021-09-24  7:12   ` Andrew Tropin
2021-09-23 20:45 ` Ludovic Courtès
2021-09-24  7:43   ` Andrew Tropin
2021-09-24 13:38 ` Xinglu Chen
2021-09-28 10:14   ` Andrew Tropin
2021-09-29 11:39     ` Xinglu Chen
2021-09-29 14:15       ` Katherine Cox-Buday
2021-09-29 15:02         ` Xinglu Chen
2021-09-30  6:11       ` Andrew Tropin
2021-09-28 12:43   ` Ludovic Courtès
2021-09-28 15:23     ` Xinglu Chen [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87mtnw4tbm.fsf@yoctocell.xyz \
    --to=public@yoctocell.xyz \
    --cc=andrew@trop.in \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).