Subject: Re: bug#51657: [PATCH] scripts: home: Make ‘guix home import’populate ‘home-configuration.scm

From: Ludovic Courtès <[email-masked]>
Date: Wed, 17 Nov 2021 16:44:42 +0100

Hello,

Xinglu Chen <[email-masked]> skribis:

> * guix/scripts/home.scm (process-command): Populate ‘home-configuration.scm’
>   in the destination directory instead of printing to stdout.
> * doc/guix.texi (Declaring the Home Environment): Adjust accordingly.
> (Invoking guix home): Likewise.

Applied with the changes below.  This is looking nice now!

Thanks!

Ludo’.

diff --git a/doc/guix.texi b/doc/guix.texi
index 5ce18fdf8a..59ceb4477a 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36673,7 +36673,7 @@ environment.  Note that not every home service that exists is supported
 
 @example
 $ guix home import ~/guix-config
-/home/alice/guix-config has been populated with all the configuration files of your home environment.  Run 'guix home reconfigure /home/alice/guix-config/home-configuration.scm' to make it take effect.
+guix home: '/home/alice/guix-config' populated with all the Home configuration files
 @end example
 
 @end table
diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm
index 118e66895e..afc7d8b39c 100644
--- a/guix/scripts/home.scm
+++ b/guix/scripts/home.scm
@@ -277,9 +277,12 @@ (define-syntax-rule (with-store* store exp ...)
        (call-with-output-file
            (string-append destination "/home-configuration.scm")
          (cut import-manifest manifest destination <>))
-       (format #t (G_ "~a/ has been populated with all the configuration files \
-of your home environment.  Run 'guix home reconfigure ~a/home-configuration.scm' \
-to make it take effect.") destination destination)))
+       (info (G_ "'~a' populated with all the Home configuration files~%")
+             destination)
+       (display-hint (format #f (G_ "\
+Run @command{guix home reconfigure ~a/home-configuration.scm} to effectively
+deploy the home environment described by these files.\n")
+                             destination))))
     ((describe)
      (match (generation-number %guix-home)
        (0