/
devenv.nix
54 lines (44 loc) · 1.1 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
44
45
46
47
48
49
50
51
52
53
54
{ pkgs, ... }:
{
# https://devenv.sh/basics/
env.DJANGO_SETTINGS_MODULE = "babybuddy.settings.development";
# https://devenv.sh/packages/
packages = [
pkgs.pipenv
pkgs.nodejs_18
pkgs.nodePackages.gulp
pkgs.sqlite
];
# https://devenv.sh/scripts/
enterShell = ''
pipenv install --dev
npm i
gulp migrate
'';
processes = {
gulp.exec = "gulp";
};
# https://devenv.sh/languages/
languages.python.enable = true;
languages.javascript = {
enable = true;
npm.install.enable = true;
};
devcontainer = {
enable = true;
settings.customizations.vscode.settings."[python]".editor.defaultFormatter = "ms-python.black-formatter";
settings.customizations.vscode.settings."[python]".pipenvPath = "pipenv";
settings.customizations.vscode.extensions = [
"bbenoist.Nix"
"ms-python.python"
"batisteo.vscode-django"
"ms-python.black-formatter"
];
};
# services.nginx.enable = true;
pre-commit.hooks = {
# format Python code
black.enable = true;
};
# See full reference at https://devenv.sh/reference/options/
}