-
Notifications
You must be signed in to change notification settings - Fork 3
docs(readme): improve Nix development environment setup instructions #279
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
- 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
commit: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issues found across 1 file
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR improves the Nix development environment setup instructions in the README by expanding the previous brief instructions into a more comprehensive guide with installation commands and activation options.
Key changes:
- Adds Nix installation command using the experimental installer
- Provides instructions for enabling flakes configuration
- Reorganizes the section with separate subsections for installation and activation
- Clarifies direnv vs manual activation options
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ | ||
| sh -s -- install |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The experimental installer URL may not be the official or recommended way to install Nix. The official Nix installation instructions at nixos.org recommend using curl -L https://nixos.org/nix/install | sh or the Determinate Systems installer. The artifacts.nixos.org/experimental-installer endpoint is for testing experimental features and may not be stable or officially supported. Consider using the official installer or documenting why the experimental version is needed.
| # If flakes are not enabled, enable them with: | ||
| mkdir -p ~/.config/nix && echo "experimental-features = nix-command flakes" >> ~/.config/nix/nix.conf | ||
| ``` |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions suggest enabling flakes after installing Nix, but the experimental installer (line 609-610) already enables flakes by default. This creates confusion - if the experimental installer is used, the flakes configuration step on line 613 is redundant. Either remove the experimental installer command and use the official installer, or clarify that line 613 is only needed if using a different installation method.
| ```bash | ||
| # Automatic activation with direnv (recommended) | ||
| direnv allow | ||
|
|
||
| # Or manual activation |
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The instructions don't mention that direnv itself needs to be installed before running direnv allow. Users who don't have direnv installed will encounter an error when trying to run this command. Consider adding a note about installing direnv first (e.g., through their package manager or the direnv installation guide), or mention that direnv is optional and they can skip directly to nix develop if they don't have it.
| ```bash | |
| # Automatic activation with direnv (recommended) | |
| direnv allow | |
| # Or manual activation | |
| You can activate the development environment either automatically using [`direnv`](https://direnv.net/) (optional) or manually with `nix develop`. If you want automatic activation, make sure `direnv` is installed on your system (for example via your package manager) before running the command below. | |
| ```bash | |
| # Automatic activation with direnv (recommended, requires direnv to be installed) | |
| direnv allow | |
| # Or manual activation (no direnv required) |
| curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ | ||
| sh -s -- install | ||
|
|
Copilot
AI
Jan 5, 2026
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Security consideration: piping a curl command directly to sh can be risky as it executes remote code without inspection. While this is a common pattern for installers, consider adding a note suggesting users review the installation script first, or provide an alternative two-step approach where users download the script first and then execute it after inspection.
| curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer | \ | |
| sh -s -- install | |
| # Download the official Nix installer script | |
| curl --proto '=https' --tlsv1.2 -sSf -L https://artifacts.nixos.org/experimental-installer -o nix-installer.sh | |
| chmod +x nix-installer.sh | |
| # (Recommended) Review the installer script before running it: | |
| # $EDITOR nix-installer.sh | |
| # Run the installer | |
| ./nix-installer.sh install |
Summary
Test plan
Summary by cubic
Improved README instructions for setting up the Nix-based development environment to reduce friction. Adds the experimental Nix installer command, guidance to enable flakes, clarifies direnv activation with the existing .envrc, and links to flake.nix.
Written for commit 853c62d. Summary will update on new commits.