Skip to content

Commit 90c36da

Browse files
committed
feat: Add nix dev shell
1 parent 5aa6f9f commit 90c36da

File tree

8 files changed

+86
-5
lines changed

8 files changed

+86
-5
lines changed

.envrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
use flake

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ coverage
1313
@type
1414

1515
# tsimp cache
16-
.tsimp
16+
/.tsimp
17+
/.direnv
1718

1819
/src/**/*.js
1920
/lib

.husky/pre-commit

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
pnpm run staged
22
pnpm run lint:types
3+
git update-index --again

.lintstagedrc.json

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
11
{
2-
"*.{ts,js,json,jsonc}": [
3-
"pnpm biome format --write --no-errors-on-unmatched",
4-
"pnpm biome lint --write --no-errors-on-unmatched"
5-
]
2+
"*.{ts,js,json,jsonc}": "pnpm biome check --write --no-errors-on-unmatched",
3+
"*.nix": "nixfmt"
64
}

.vscode/settings.json

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,10 @@
2626
"editor.codeActionsOnSave": {
2727
"quickfix.biome": "explicit"
2828
}
29+
},
30+
31+
"[nix]": {
32+
"editor.defaultFormatter": "jnoortheen.nix-ide",
33+
"editor.formatOnSave": true
2934
}
3035
}

flake.lock

Lines changed: 43 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: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
inputs = {
3+
nixpkgs.url = "github:NixOS/nixpkgs/nixos-25.05";
4+
systems.url = "github:nix-systems/default";
5+
};
6+
7+
outputs =
8+
{ nixpkgs, systems, ... }:
9+
{
10+
devShells = nixpkgs.lib.genAttrs (import systems) (
11+
system:
12+
let
13+
pkgs = import nixpkgs { inherit system; };
14+
in
15+
{
16+
default = import ./shell.nix { inherit pkgs; };
17+
}
18+
);
19+
};
20+
}

shell.nix

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
{
2+
pkgs ? import <nixpkgs> { },
3+
}:
4+
with pkgs;
5+
mkShell {
6+
packages = [
7+
nixd
8+
nixfmt-rfc-style
9+
nodejs_22
10+
corepack_22
11+
];
12+
}

0 commit comments

Comments
 (0)