From 05ddd3f58f949b4d4da5527f09870235fad536cc Mon Sep 17 00:00:00 2001 From: ryoppippi <1560508+ryoppippi@users.noreply.github.com> Date: Mon, 5 Jan 2026 17:38:58 +0000 Subject: [PATCH] docs(readme): improve Nix development environment setup instructions - Add Nix installation command using experimental installer - Add instructions for enabling flakes if not already enabled - Clarify direnv activation (use existing .envrc) - Link to flake.nix for reference - Reorganise useful commands into separate section --- README.md | 25 ++++++++++++++++--------- 1 file changed, 16 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index e9741d3..f869beb 100644 --- a/README.md +++ b/README.md @@ -337,20 +337,27 @@ For more examples, check out the [examples/](examples/) directory: ### Using Nix (Recommended) -[Nix](https://nixos.org/) with flakes provides a consistent development environment: +This project includes a Nix flake for reproducible development environments. All development tools are defined in [flake.nix](./flake.nix) and provided via Nix. + +#### Installing Nix ```bash -# Enter development environment (auto-installs dependencies and git hooks) -nix develop +# Install Nix with flakes enabled (if not already installed) +curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ + sh -s -- install -# Or with direnv (recommended for automatic activation) -direnv allow +# If flakes are not enabled, enable them with: +mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf +``` -# Format code -nix fmt +#### Activating the Development Environment -# Run checks -nix flake check +```bash +# Automatic activation with direnv (recommended) +direnv allow + +# Or manual activation +nix develop ``` The Nix development environment includes: