-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdevenv.nix
More file actions
48 lines (43 loc) · 1 KB
/
Copy pathdevenv.nix
File metadata and controls
48 lines (43 loc) · 1 KB
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
{ pkgs, lib, config, inputs, ... }: {
packages = [ ];
enterShell = ''
if [ ! -f back/.env ]; then
cp back/.env.example back/.env
sed -i 's/supermotdepasse/tekiens_net/g' back/.env
fi
'';
services.mysql = {
enable = true;
initialDatabases = [{
name = "tekiens_net";
schema = ./db/init.sql;
}];
ensureUsers = [{
name = "tekiens_net";
password = "tekiens_net";
ensurePermissions."tekiens_net.*" = "ALL PRIVILEGES";
}];
};
languages.python = {
enable = true;
directory = "./back";
venv = {
enable = true;
requirements = ./back/requirements.txt;
};
};
languages.javascript = {
enable = true;
directory = "./front";
npm = {
enable = true;
install.enable = true;
};
};
processes = {
backend.exec =
"cd ${config.languages.python.directory} && python3 -m flask run";
frontend.exec =
"cd ${config.languages.javascript.directory} && npx vite build --watch";
};
}