-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathdevenv.nix
43 lines (40 loc) · 1.01 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
{ pkgs, ... }:
{
packages = with pkgs; [
atlas
hurl
golangci-lint
];
processes = {
splitfree-backend = {
exec = "go run ./splitfree-backend";
process-compose = {
environment = [
''AUTH0_CALLBACK_URL=''${AUTH0_CALLBACK_URL}''
''AUTH0_DOMAIN=''${AUTH0_DOMAIN}''
''AUTH0_CLIENT_ID=''${AUTH0_CLIENT_ID}''
''AUTH0_CLIENT_SECRET=''${AUTH0_CLIENT_SECRET}''
"SPLITFREE_CANONICAL_URL=http://localhost:3000"
];
depends_on = {
postgres = { condition = "process_healthy"; };
};
};
};
};
services.postgres = {
enable = true;
listen_addresses = "127.0.0.1";
initialDatabases = [{ name = "splitfree"; }];
initialScript = ''
CREATE USER splitfree WITH PASSWORD 'splitfree';
GRANT ALL PRIVILEGES ON DATABASE splitfree TO splitfree;
\c splitfree;
GRANT ALL ON SCHEMA public TO splitfree;
'';
};
languages = {
go.enable = true;
};
cachix.enable = false;
}