diff mbox series

[bug#50873,v3,6/8] doc: Document the ‘guix home import’ subcommand.

Message ID a97d97a95c1a7b76488866d6e9f7070beccee719.1635590221.git.public@yoctocell.xyz
State Accepted
Headers show
Series Fixes to ‘guix home import’ | expand

Checks

Context Check Description
cbaines/comparison success View comparision
cbaines/git branch success View Git branch
cbaines/applying patch success View Laminar job
cbaines/issue success View issue

Commit Message

Xinglu Chen Oct. 30, 2021, 10:42 a.m. UTC
* doc/guix.texi (Invoking guix home): Document ‘guix home import’.
---
 doc/guix.texi | 32 ++++++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
diff mbox series

Patch

diff --git a/doc/guix.texi b/doc/guix.texi
index 22215214e0..3c069912cb 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36509,6 +36509,38 @@ 
 $ guix home list-generations 10d
 @end example
 
+@item import
+Generate a @dfn{home environment} from the packages in the default
+profile and configuration files found in the user's home directory.  The
+configuration files will be copied to the specified directory.  Note
+that not every home service that exists is supported (@pxref{Home
+Services}).
+
+@example
+$ guix home import ~/guix-config
+;; This "home-environment" file can be passed to 'guix home reconfigure'
+;; to reproduce the content of your profile.  This is "symbolic": it only
+;; specifies package names.  To reproduce the exact same profile, you also
+;; need to capture the channels being used, as returned by "guix describe".
+;; See the "Replicating Guix" section in the manual.
+
+(use-modules
+  (gnu home)
+  (gnu packages)
+  (gnu home services shells))
+
+(home-environment
+  (packages
+    (map specification->package
+         (list "glibc-locales" "nss-certs" "nss")))
+  (services
+    (list (service
+            home-bash-service-type
+            (home-bash-configuration
+              (bashrc
+                (list (local-file "/tmp/guix-config/.bashrc"))))))))
+@end example
+
 @end table
 
 @var{options} can contain any of the common build options (@pxref{Common