Add flake.nix and flake.lock for reproducible dev env #1268
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
flake.lock
pins exact inputs to avoid “works on my machine.”What’s included
flake.nix
: defines dev shell, build/run outputs, and inputs.flake.lock
: lockfile generated by Nix.Why
Install Nix if needed: https://nixos.org/download
How to use
Consider using with
direnv
Using direnv with a Nix flake makes your dev shell automatic and per-repo. When you cd into the project, direnv reads .envrc (e.g., use flake) and transparently loads the pinned tools and env from your flake; leaving the directory unloads them, so you don’t leak PATH changes or variables into other projects. It also watches files (like flake.nix/flake.lock) and reloads on changes, and uses an explicit allowlist (direnv allow) so nothing runs without your consent. Learn more at https://direnv.net
Notes
Note
Adds
flake.nix
andflake.lock
to define a reproducible dev shell with pinned toolchain and ane2b
CLI wrapper.flake.nix
definingdevShell
with pinned tools:terraform
("1.5"),google-cloud-sdk
,go
,docker
,cloudflared
,postgresql
,nodejs
/npm
,git
,packer
,bashInteractive
.e2b
CLI wrapper usingnpx @e2b/cli@latest
.libnotify
,inotify-tools
), macOS (terminal-notifier
, Apple frameworksCoreFoundation
,CoreServices
).flake.lock
:nixpkgs
(25.05),nixos-unstable
,flake-utils
,nixpkgs-terraform
.Written by Cursor Bugbot for commit fefb8f9. This will update automatically on new commits. Configure here.