-
Notifications
You must be signed in to change notification settings - Fork 2
/
devenv.nix
47 lines (39 loc) · 1.23 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
{ pkgs, ... }:
{
dotenv.enable = true;
dotenv.filename = ".env.local";
enterShell = ''
export PRISMA_SCHEMA_ENGINE_BINARY="${pkgs.prisma-engines}/bin/schema-engine"
export PRISMA_QUERY_ENGINE_BINARY="${pkgs.prisma-engines}/bin/query-engine"
export PRISMA_QUERY_ENGINE_LIBRARY="${pkgs.prisma-engines}/lib/libquery_engine.node"
export PRISMA_INTROSPECTION_ENGINE_BINARY="${pkgs.prisma-engines}/bin/introspection-engine"
export PRISMA_FMT_BINARY="${pkgs.prisma-engines}/bin/prisma-fmt"
'';
packages = with pkgs; [
prisma-engines
];
languages = {
typescript.enable = true;
javascript.enable = true;
javascript.pnpm.enable = true;
};
processes = {
server.exec = "pnpm run dev:server";
scheduler.exec = "pnpm run dev:scheduler";
tailwind.exec = "pnpm run tailwind:css";
};
services = {
postgres = {
enable = true;
package = pkgs.postgresql_15;
initialScript = ''
CREATE USER skymoth WITH SUPERUSER PASSWORD 'skymoth';
CREATE DATABASE skymoth;
ALTER USER skymoth CREATEDB;
GRANT ALL PRIVILEGES ON DATABASE skymoth TO skymoth;
'';
listen_addresses = "127.0.0.1";
};
};
pre-commit.hooks.commitizen.enable = true;
}