mirror of
https://github.com/ryan4yin/nixos-and-flakes-book.git
synced 2024-11-22 16:13:26 +01:00
polish: the new cli
This commit is contained in:
parent
4f50190393
commit
c85e6e3878
@ -62,13 +62,13 @@ echo "Hello Nix" | nix run "github:NixOS/nixpkgs/nixos-unstable#ponysay"
|
||||
|
||||
## Common Use Cases for `nix run` and `nix shell`
|
||||
|
||||
These commands are commonly used for running temporary commands. For example, if I want to clone my configuration repository using Git on a new NixOS host without Git installed, I can use the following command:
|
||||
These commands are commonly used for running programs temporarily. For example, if I want to clone my configuration repository using Git on a new NixOS host without Git installed, I can use the following command:
|
||||
|
||||
```bash
|
||||
nix run nixpkgs#git clone git@github.com:ryan4yin/nix-config.git
|
||||
```
|
||||
|
||||
Alternatively, you can use the following command:
|
||||
Alternatively, I can use `nix shell` to enter an environment with Git and then run the `git clone` command:
|
||||
|
||||
```bash
|
||||
nix shell nixpkgs#git
|
||||
|
Loading…
Reference in New Issue
Block a user