doc: convention improvements for copying closure (#10702)

* doc: convention improvements for copying closure

   use -P, which only considers executables but not shell builtins

Co-authored-by: Valentin Gagarin <valentin.gagarin@tweag.io>
This commit is contained in:
Eli Flanagan 2024-05-14 16:38:54 -04:00 committed by GitHub
parent 2f0031aedc
commit 05ad4e8806
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -78,14 +78,14 @@ authentication, you can avoid typing the passphrase with `ssh-agent`.
Copy Firefox with all its dependencies to a remote machine:
```console
$ nix-copy-closure --to alice@itchy.labs $(type -tP firefox)
$ nix-copy-closure --to alice@itchy.example.org $(type -P firefox)
```
Copy Subversion from a remote machine and then install it into a user
environment:
```console
$ nix-copy-closure --from alice@itchy.labs \
$ nix-copy-closure --from alice@itchy.example.org \
/nix/store/0dj0503hjxy5mbwlafv1rsbdiyx1gkdy-subversion-1.4.4
$ nix-env --install /nix/store/0dj0503hjxy5mbwlafv1rsbdiyx1gkdy-subversion-1.4.4
```