From f5fc395ab4cc79d52a4e316b907e780a5a7adb30 Mon Sep 17 00:00:00 2001 From: Xinglu Chen Date: Sun, 7 Nov 2021 12:13:32 +0100 Subject: scripts: home: Make ‘guix home import’ write home-configuration.scm. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * 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. Suggested-by: Ludovic Courtès Co-authored-by: Ludovic Courtès --- guix/scripts/home.scm | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'guix/scripts/home.scm') diff --git a/guix/scripts/home.scm b/guix/scripts/home.scm index 3f48b98ed4..afc7d8b39c 100644 --- a/guix/scripts/home.scm +++ b/guix/scripts/home.scm @@ -274,7 +274,15 @@ argument list and OPTS is the option alist." (_ (leave (G_ "wrong number of arguments~%")))))) (unless (file-exists? destination) (mkdir-p destination)) - (import-manifest manifest destination (current-output-port)))) + (call-with-output-file + (string-append destination "/home-configuration.scm") + (cut import-manifest manifest 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 -- cgit v1.2.3