From 2c2a300616fa151b91858a2a7d88bdc9b9dae497 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Orhun=20Parmaks=C4=B1z?= Date: Sun, 2 Jun 2024 22:46:33 +0300 Subject: [PATCH] docs(website): clean up Nix docs --- website/docs/installation/nix.md | 35 ++++++++++++++++---------------- 1 file changed, 18 insertions(+), 17 deletions(-) diff --git a/website/docs/installation/nix.md b/website/docs/installation/nix.md index a5177d055b..b405a4e7c3 100644 --- a/website/docs/installation/nix.md +++ b/website/docs/installation/nix.md @@ -1,15 +1,16 @@ --- -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 ``` @@ -17,23 +18,26 @@ nix-shell -p git-cliff 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 ``` @@ -41,7 +45,7 @@ nix run nixpkgs#git-cliff To open a new shell with git-cliff available, use: -```sh +```bash nix shell nixpkgs#git-cliff ``` @@ -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