-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
47 lines (40 loc) · 951 Bytes
/
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
{ pkgs, lib, config, inputs, ... }:
{
# devenv shell format-python
scripts.format-python.exec = ''
black .
'';
languages.nix.enable = true;
languages.python.enable = true;
env."PROJECT_NAME"= "OpenStack-DB-Usage-Exporter";
packages = [
pkgs.git
pkgs.mariadb_106
(pkgs.python3.withPackages (ps: with ps; [
jinja2
pymysql
black
]))
];
{
pre-commit.hooks = {
# format Python code
black.enable = true;
# shellcheck.enable = true;
# detect-private-keys.enable = true;
# yamllint.enable = true;
# nixpkgs-fmt.enable = true;
};
}
services.mysql = {
enable = true;
package = pkgs.mariadb_106;
settings = {
mysqld = {
group_concat_max_len = 320000;
log_bin_trust_function_creators = 1;
sql_mode = "STRICT_TRANS_TABLES,NO_ZERO_IN_DATE,NO_ZERO_DATE,ERROR_FOR_DIVISION_BY_ZERO,NO_ENGINE_SUBSTITUTION";
};
};
};
}