2023-09-17 01:09:46 +00:00
|
|
|
{ pkgs, ... }:
|
|
|
|
|
|
|
|
{
|
|
|
|
# https://devenv.sh/basics/
|
|
|
|
env.DJANGO_SETTINGS_MODULE = "babybuddy.settings.development";
|
|
|
|
|
|
|
|
# https://devenv.sh/packages/
|
|
|
|
packages = [
|
|
|
|
pkgs.pipenv
|
|
|
|
pkgs.nodejs_18
|
2023-09-17 09:12:52 +00:00
|
|
|
pkgs.nodePackages.gulp
|
2023-09-27 13:24:53 +00:00
|
|
|
pkgs.sqlite
|
2023-09-17 01:09:46 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
# https://devenv.sh/scripts/
|
|
|
|
|
|
|
|
enterShell = ''
|
|
|
|
pipenv install --dev
|
|
|
|
npm i
|
2023-09-17 09:12:52 +00:00
|
|
|
gulp migrate
|
2023-09-17 01:09:46 +00:00
|
|
|
'';
|
|
|
|
|
2023-09-30 18:57:34 +00:00
|
|
|
processes = {
|
|
|
|
gulp.exec = "gulp";
|
|
|
|
};
|
|
|
|
|
2023-09-17 01:09:46 +00:00
|
|
|
# https://devenv.sh/languages/
|
|
|
|
languages.python.enable = true;
|
|
|
|
languages.javascript = {
|
|
|
|
enable = true;
|
|
|
|
npm.install.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-09-17 09:12:52 +00:00
|
|
|
devcontainer = {
|
|
|
|
enable = true;
|
2023-09-27 13:24:53 +00:00
|
|
|
settings.customizations.vscode.settings."[python]".editor.defaultFormatter = "ms-python.black-formatter";
|
2023-09-30 18:57:34 +00:00
|
|
|
settings.customizations.vscode.settings."[python]".pipenvPath = "pipenv";
|
2023-09-17 09:12:52 +00:00
|
|
|
settings.customizations.vscode.extensions = [
|
|
|
|
"bbenoist.Nix"
|
|
|
|
"ms-python.python"
|
|
|
|
"batisteo.vscode-django"
|
2023-09-27 13:24:53 +00:00
|
|
|
"ms-python.black-formatter"
|
2023-09-17 09:12:52 +00:00
|
|
|
];
|
|
|
|
};
|
2023-09-17 01:09:46 +00:00
|
|
|
|
2023-09-17 06:27:01 +00:00
|
|
|
# services.nginx.enable = true;
|
2023-09-17 01:09:46 +00:00
|
|
|
|
2023-09-27 13:24:53 +00:00
|
|
|
pre-commit.hooks = {
|
|
|
|
# format Python code
|
|
|
|
black.enable = true;
|
|
|
|
};
|
|
|
|
|
2023-09-17 01:09:46 +00:00
|
|
|
# See full reference at https://devenv.sh/reference/options/
|
|
|
|
}
|