aboutsummaryrefslogtreecommitdiff
path: root/src/nix/copy.cc
diff options
context:
space:
mode:
authorEelco Dolstra <edolstra@gmail.com>2017-09-08 11:33:46 +0200
committerEelco Dolstra <edolstra@gmail.com>2017-09-08 11:33:46 +0200
commita2740c9ca23e748c3ab8ea61a135594a94c86aae (patch)
tree2ab92617c45b95e3843ec069f4a8aa5612ea0361 /src/nix/copy.cc
parent88e6bb76de5564b3217be9688677d1c89101b2a3 (diff)
nix copy: Add examples
Diffstat (limited to 'src/nix/copy.cc')
-rw-r--r--src/nix/copy.cc10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/nix/copy.cc b/src/nix/copy.cc
index fe963e794..bf9ffe755 100644
--- a/src/nix/copy.cc
+++ b/src/nix/copy.cc
@@ -39,9 +39,17 @@ struct CmdCopy : StorePathsCommand
{
return {
Example{
- "To copy Firefox to the local store to a binary cache in file:///tmp/cache:",
+ "To copy Firefox from the local store to a binary cache in file:///tmp/cache:",
"nix copy --to file:///tmp/cache -r $(type -p firefox)"
},
+ Example{
+ "To copy the entire current NixOS system closure to another machine via SSH:",
+ "nix copy --to ssh://server -r /run/current-system"
+ },
+ Example{
+ "To copy a closure from another machine via SSH:",
+ "nix copy --from ssh://server -r /nix/store/a6cnl93nk1wxnq84brbbwr6hxw9gp2w9-blender-2.79-rc2"
+ },
};
}