Skip to content

Commit 2f2f31c

Browse files
Uzaaftmehalter
andauthored
feat(build): Add in nix flake for devShell (#169)
* feat(build): Add in nix flake for devShell - Flake.nix and lock for devShell - .envrc for direnv - Ignore .direnv folder * chore(build): Remove alejandra as formatter * fix(build): remove `alejandra` * feat(build): add `.tool-versions` for asdf and mise environments --------- Co-authored-by: Micah Halter <[email protected]>
1 parent 507456b commit 2f2f31c

File tree

5 files changed

+93
-0
lines changed

5 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

.tool-versions

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
nodejs 22
2+
pnpm 9

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: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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];};
20+
}
21+
);
22+
}

0 commit comments

Comments
 (0)