-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdev.nix
More file actions
139 lines (132 loc) · 3.9 KB
/
dev.nix
File metadata and controls
139 lines (132 loc) · 3.9 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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
{ pkgs, ... }:
{
# Which nixpkgs channel to use.
channel = "stable-23.11"; # Or "unstable"
# Used to configure the language output.
#
# languages = {
# c = {
# enable = false;
# # Which compiler to use.
# # Supported values: "clang", "gcc"
# compiler = "clang";
# };
# csharp = {
# enable = false;
# # The C# "channel" to use.
# # Supported values: "7.0", "6.0"
# channel = "7.0";
# };
# go = {
# enable = false;
# # The Go "channel" to use.
# # Supported values: "1.21", "1.20", "1.19"
# channel = "1.21";
# };
# java = {
# enable = false;
# # The Java "channel" to use.
# # Supported values: "17", "11", "8"
# channel = "17";
# };
# nodejs = {
# enable = true;
# # The Node.js "channel" to use.
# # Supported values: "20", "18", "16"
# channel = "20";
# # The package manager to use.
# # Supported values: "npm", "pnpm", "yarn"
# packageManager = "npm";
# };
# php = {
# enable = false;
# # The PHP "channel" to use.
# # Supported values: "8_2", "8_1", "8_0"
# channel = "8_2";
# };
# python = {
# enable = true;
# # The Python "channel" to use.
# # Supported values: "3_11", "3_10", "3_9"
# channel = "3_11";
# };
# ruby = {
# enable = false;
# # The Ruby "channel" to use.
# # Supported values: "3_2", "3_1", "3_0"
# channel = "3_2";
# };
# rust = {
# enable = false;
# # The Rust "channel" to use.
# # Supported values: "stable", "beta", "nightly"
# channel = "stable";
# };
# };
# The list of packages to be install
packages = [
pkgs.nodejs_20,
pkgs.python311,
pkgs.python311Packages.fastapi,
pkgs.python311Packages.uvicorn,
pkgs.python311Packages.websockets
];
# Sets environment variables in the workspace
env = {
"GENKIT_ENV" = "dev";
"GOOGLE_CLOUD_PROJECT" = "pntest-429712";
"FIREBASE_PROJECT_ID" = "pntest-429712";
};
# Services to make available in the preview.
services = {
# Each service is a mapping from a port number to a configuration.
# When a port is exposed, it will be automatically detected and a
# preview action will be created for it.
#
# Here's an example of a service that would be available on port 3000.
#
# 3000 = {
# # A command to run to start the service.
# #
# # The command is a list of strings, where the first string is the
# # command to run and the rest of the strings are the arguments.
# #
# # Note that the command is not run in a shell, so you can't use
# # shell features like pipes, redirection, or environment variable
# # substitution.
# #
# # If you need to use shell features, you can run a shell yourself,
# # for example:
# #
# # command = ["bash", "-c", "my-command --port $PORT"];
# #
# # In this case, the PORT environment variable will be set to the
# # port number of the service (3000 in this example).
# #
# # The working directory of the command is the root of the
# # workspace.
# command = ["npm", "run", "dev"];
#
# # A string to search for in the service's output to determine when
# # it's ready to accept connections.
# #
# # If you don't specify this, the service will be considered ready
# # as soon as the command is started.
# #
# # ready_regex = "Ready on";
# };
};
# A list of shell commands to run before any of the services are started.
#
# pre_start = [
# "npm install"
# ];
# The entrypoint of the dev server.
#
# The value must be a string, which will be executed in a shell.
#
# Example:
#
# startCommand = "npm run dev";
startCommand = "python3 -m uvicorn src.main:app --host 0.0.0.0 --port 9002 --reload";
}