Skip to content

Commit 4480102

Browse files
committed
feat(build): Add in nix flake for devShell
- Flake.nix and lock for devShell - .envrc for direnv - Ignore .direnv folder
1 parent 507456b commit 4480102

File tree

4 files changed

+93
-0
lines changed

4 files changed

+93
-0
lines changed

.envrc

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
# vim: set ft=bash:
2+
if has nix; then
3+
use flake
4+
fi

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,4 @@ pnpm-debug.log*
2222
# macOS-specific files
2323
.DS_Store
2424
.vercel
25+
.direnv

flake.lock

Lines changed: 64 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
{
2+
description = "docs.astronvim.org";
3+
inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";
4+
inputs.systems.url = "github:nix-systems/default";
5+
inputs.flake-utils = {
6+
url = "github:numtide/flake-utils";
7+
inputs.systems.follows = "systems";
8+
};
9+
10+
outputs = {
11+
nixpkgs,
12+
flake-utils,
13+
...
14+
}:
15+
flake-utils.lib.eachDefaultSystem (
16+
system: let
17+
pkgs = nixpkgs.legacyPackages.${system};
18+
in {
19+
devShells.default = pkgs.mkShell {packages = with pkgs; [nodejs_22 pnpm alejandra];};
20+
21+
formatter = pkgs.alejandra;
22+
}
23+
);
24+
}

0 commit comments

Comments
 (0)