Skip to content

Commit

Permalink
feat: nix direnv (#1367)
Browse files Browse the repository at this point in the history
## Description

run `direnv allow` and all the nix packages in `flake.nix` will be
injected into your shell

## Testing

Explain the quality checks that have been done on the code changes

## Additional Information

- [x] I read the [contributing docs](../docs/contributing.md) (if this
is your first contribution)

Your ENS/address:

esm.eth

<!-- This is an auto-generated comment: release notes by coderabbit.ai
-->

## Summary by CodeRabbit

- **New Features**
	- Integrated `Direnv` for improved environment variable management.
- Enhanced file association for `.envrc` with syntax highlighting in
Visual Studio Code.
- Added `direnv` to package dependencies for streamlined development
setups.

- **Bug Fixes**
- Updated `.gitignore` to exclude `.direnv` files, improving project
cleanliness.

- **Documentation**
- Updated recommended extensions in Visual Studio Code to support better
Nix syntax.

<!-- end of auto-generated comment: release notes by coderabbit.ai -->
  • Loading branch information
o-az authored Aug 6, 2024
1 parent 58698c8 commit 4ca121d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions .envrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
use flake
export DIRENV_WARN_TIMEOUT=1m
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -59,3 +59,4 @@ Thumbs.db
.zshrc
/target
_
.direnv
2 changes: 1 addition & 1 deletion .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// there is no angular in this repo!
// but this is useful for running nx commands in vscode
"nrwl.angular-console",
"antfu.vite"
"jeff-hykin.better-nix-syntax"
],
"unwantedRecommendations": [
// we use biome for linting and formatting
Expand Down
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
},
"files.associations": {
".gas-snapshot": "julia",
"base.json": "jsonc"
"base.json": "jsonc",
".envrc": "dotenv"
}
}
1 change: 1 addition & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@
pkgs.nodejs_22
pkgs.nodePackages.pnpm
pkgs.bun
pkgs.direnv
pkgs.foundry-bin
pkgs.rust-bin.stable.latest.default # or pkgs.rust-bin.beta.latest.default
];
Expand Down

0 comments on commit 4ca121d

Please sign in to comment.