Skip to content

Commit

Permalink
docs(website): clean up Nix docs
Browse files Browse the repository at this point in the history
  • Loading branch information
orhun committed Jun 2, 2024
1 parent 63c8ad4 commit 2c2a300
Showing 1 changed file with 18 additions and 17 deletions.
35 changes: 18 additions & 17 deletions website/docs/installation/nix.md
Original file line number Diff line number Diff line change
@@ -1,47 +1,51 @@
---
sidebar_position: 4
sidebar_position: 5
---

# Nix

If you are using Nix, **git-cliff** can be installed from the [official latest staple channel][channel-link].
If you are using Nix, **git-cliff** can be installed from the [official latest stable channel](https://search.nixos.org/packages?channel=24.05&show=git-cliff&from=0&size=50&sort=relevance&type=packages&query=git-cliff).

## Using nix-shell

To temporarily install git-cliff in a shell environment, run:

```sh
```bash
nix-shell -p git-cliff
```

## Using nix-env

To install git-cliff permanently, use:

```sh
```bash
nix-env -iA nixpkgs.git-cliff
```

> [!WARNING]
> Using nix-env permanently modifies a local profile of installed packages.
> This must be updated and maintained by the user in the same way as with a traditional package manager,
> foregoing many of the benefits that make Nix uniquely powerful.
> Using nix-shell or a NixOS configuration is recommended instead.
:::warning

Using nix-env permanently modifies a local profile of installed packages.
This must be updated and maintained by the user in the same way as with a traditional package manager,
foregoing many of the benefits that make Nix uniquely powerful.
Using nix-shell or a NixOS configuration is recommended instead.

:::

## The new CLI
## The New CLI

If you're using the new experimental CLI, you can use any of the following:

### `nix run
```sh
### `nix run`

```bash
nix run nixpkgs#git-cliff
```

### `nix shell`

To open a new shell with git-cliff available, use:

```sh
```bash
nix shell nixpkgs#git-cliff
```

Expand All @@ -51,12 +55,9 @@ While new releases of **git-cliff** typically become available in the stable cha

To add and update the unstable channel, run:

```sh
```bash
nix-channel --add https://nixos.org/channels/nixpkgs-unstable
nix-channel --update nixpkgs
```

After updating to the unstable channel, you can use any of the previous installation commands to install **git-cliff**.


[channel-link]: https://search.nixos.org/packages?channel=24.05&show=git-cliff&from=0&size=50&sort=relevance&type=packages&query=git-cliff

0 comments on commit 2c2a300

Please sign in to comment.