Skip to content

Commit 05ddd3f

Browse files
committed
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
1 parent a8a3bfc commit 05ddd3f

File tree

1 file changed

+16
-9
lines changed

1 file changed

+16
-9
lines changed

README.md

Lines changed: 16 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -337,20 +337,27 @@ For more examples, check out the [examples/](examples/) directory:
337337

338338
### Using Nix (Recommended)
339339

340-
[Nix](https://nixos.org/) with flakes provides a consistent development environment:
340+
This project includes a Nix flake for reproducible development environments. All development tools are defined in [flake.nix](./flake.nix) and provided via Nix.
341+
342+
#### Installing Nix
341343

342344
```bash
343-
# Enter development environment (auto-installs dependencies and git hooks)
344-
nix develop
345+
# Install Nix with flakes enabled (if not already installed)
346+
curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \
347+
sh -s -- install
345348

346-
# Or with direnv (recommended for automatic activation)
347-
direnv allow
349+
# If flakes are not enabled, enable them with:
350+
mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf
351+
```
348352

349-
# Format code
350-
nix fmt
353+
#### Activating the Development Environment
351354

352-
# Run checks
353-
nix flake check
355+
```bash
356+
# Automatic activation with direnv (recommended)
357+
direnv allow
358+
359+
# Or manual activation
360+
nix develop
354361
```
355362

356363
The Nix development environment includes:

0 commit comments

Comments
 (0)