-
Notifications
You must be signed in to change notification settings - Fork 1
/
devenv.nix
43 lines (37 loc) · 1.43 KB
/
devenv.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
# Docs: https://devenv.sh/basics/
{pkgs, ...}: {
dotenv.enable = true;
languages = {
# Docs: https://devenv.sh/languages/
nix.enable = true;
javascript = {
enable = true; # source: https://github.com/cachix/devenv/blob/main/src/modules/languages/javascript.nix
corepack.enable = true; # shim for npm/yarn/pnpm - https://github.com/nodejs/corepack#readme
#- but questionable: https://github.com/cachix/devenv/pull/475#issuecomment-1571879078
};
};
packages = with pkgs; [
# Search for packages: https://search.nixos.org/packages?channel=unstable&query=cowsay
# (note: this searches on unstable channel, be aware your nixpkgs flake input might be on a release channel)
gcc # needed for some npm packages
# remove whichever you don't need
yarn
# nodePackages.pnpm
];
scripts = {
# Docs: https://devenv.sh/scripts/
# yd.exec = ''yarn dev'';
};
difftastic.enable = true; # https://devenv.sh/integrations/difftastic/
pre-commit.hooks = {
# Docs: https://devenv.sh/pre-commit-hooks/
# available pre-configured hooks: https://devenv.sh/reference/options/#pre-commithooks
# adding hooks which are not included: https://github.com/cachix/pre-commit-hooks.nix/issues/31
nil.enable = true; # nix check
nixpkgs-fmt.enable = true; # nix formatting
eslint = {
enable = true;
fail_fast = true; # skip other pre-commit hooks if this one fails
};
};
}