aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorXinglu Chen <public@yoctocell.xyz>2021-10-30 12:42:39 +0200
committerLudovic Courtès <ludo@gnu.org>2021-10-31 00:51:05 +0200
commit87c04b0e170a62aa60c8f2054ad039d169751b9c (patch)
treecba61eda8882267b190614092722064f84d19215
parent256bd712648f404451f820eaedab3985df819556 (diff)
downloadguix-87c04b0e170a62aa60c8f2054ad039d169751b9c.tar
guix-87c04b0e170a62aa60c8f2054ad039d169751b9c.tar.gz
doc: Document the ‘guix home import’ subcommand.
* doc/guix.texi (Invoking guix home): Document ‘guix home import’. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r--doc/guix.texi32
1 files changed, 32 insertions, 0 deletions
diff --git a/doc/guix.texi b/doc/guix.texi
index 22215214e0..066971b995 100644
--- a/doc/guix.texi
+++ b/doc/guix.texi
@@ -36509,6 +36509,38 @@ generations that are up to 10 days old:
$ 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 "/home/charlie/guix-config/.bashrc"))))))))
+@end example
+
@end table
@var{options} can contain any of the common build options (@pxref{Common