From e728464c1b17de565a313431a8bb0ac2adba7f85 Mon Sep 17 00:00:00 2001 From: Pablo Estrada <139084212+ecPablo@users.noreply.github.com> Date: Wed, 22 May 2024 05:42:45 -0600 Subject: [PATCH] fix: update docs in to endorse nix flakes as default usage for nix (#13085) * fix: add default to pkgs argument for nix shell. * fix: change docs to encourage default usage of nix flakes. * fix: small doc changes --- README.md | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/README.md b/README.md index d3aed1a4c06..f216e1d5875 100644 --- a/README.md +++ b/README.md @@ -272,18 +272,21 @@ Go generate is used to generate mocks in this project. Mocks are generated with ### Nix -A [shell.nix](https://nixos.wiki/wiki/Development_environment_with_nix-shell) is provided for use with the [Nix package manager](https://nixos.org/), with optional [flakes](https://nixos.wiki/wiki/Flakes) support. It defines a declarative, reproducible development environment. Flakes version use deterministic, frozen (`flake.lock`) dependencies, while non-flakes shell will use your channel's packages versions. +A [shell.nix](https://nixos.wiki/wiki/Development_environment_with_nix-shell) is provided for use with the [Nix package manager](https://nixos.org/). By default,we utilize the shell through [Nix Flakes](https://nixos.wiki/wiki/Flakes). + +Nix defines a declarative, reproducible development environment. Flakes version use deterministic, frozen (`flake.lock`) dependencies to +gain more consistency/reproducibility on the built artifacts. To use it: 1. Install [nix package manager](https://nixos.org/download.html) in your system. -- Optionally, enable [flakes support](https://nixos.wiki/wiki/Flakes#Enable_flakes) +- Enable [flakes support](https://nixos.wiki/wiki/Flakes#Enable_flakes) -2. Run `nix-shell`. You will be put in shell containing all the dependencies. +2. Run `nix develop`. You will be put in shell containing all the dependencies. -- To use the flakes version, run `nix develop` instead of `nix-shell`. Optionally, `nix develop --command $SHELL` will make use of your current shell instead of the default (bash). -- You can use `direnv` to enable it automatically when `cd`-ing into the folder; for that, enable [nix-direnv](https://github.com/nix-community/nix-direnv) and `use nix` or `use flake` on it. +- Optionally, `nix develop --command $SHELL` will make use of your current shell instead of the default (bash). +- You can use `direnv` to enable it automatically when `cd`-ing into the folder; for that, enable [nix-direnv](https://github.com/nix-community/nix-direnv) and `use flake` on it. 3. Create a local postgres database: