Subject: [bug#56428] [PATCH] home: Add -I, --list-installed option.

From: Antero Mejr <[email-masked]>
Date: Tue, 12 Jul 2022 22:50:19 +0000

Andrew Tropin <[email-masked]> writes:

> Implementing this functionality as --argument makes it possible to type
> `guix home reconfigure ./he.scm --list-installed`, which again doesn't
> make much sense as in the example above.  I advice either implement
> list-installed as a separate action or as an additional --argument to
> describe/list-generations action.

I added it to both guix home describe and list-generations. Adding it to
describe seems most intuitive to me, and adding it to list-generations
is useful for tracking when a package was added to the profile.

If --list-installed is specified for an invalid subcommand, the flag is
ignored.
Same behavior as when using --network with a guix home describe, for
example.

> 2. Would be good to mention it in doc/guix.texi.

Done.

> 3. It would be nice to implement the same for guix system.

I will do that in another patch/issue.

> To make it consistent with the rest of the module, I think it will
> better to use define and explicitly export list-installed in module
> definition at the top of the file.

Done.

Thanks for the review, and also thanks for guix home!