mirror of
https://github.com/ryan4yin/nixos-and-flakes-book
synced 2024-11-30 07:50:34 +00:00
polish: the new cli
This commit is contained in:
parent
4f50190393
commit
c85e6e3878
1 changed files with 2 additions and 2 deletions
|
@ -62,13 +62,13 @@ echo "Hello Nix" | nix run "github:NixOS/nixpkgs/nixos-unstable#ponysay"
|
||||||
|
|
||||||
## Common Use Cases for `nix run` and `nix shell`
|
## 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
|
```bash
|
||||||
nix run nixpkgs#git clone git@github.com:ryan4yin/nix-config.git
|
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
|
```bash
|
||||||
nix shell nixpkgs#git
|
nix shell nixpkgs#git
|
||||||
|
|
Loading…
Reference in a new issue