tangled
alpha
login
or
join now
pyrox.dev
/
nixpkgs
lol
0
fork
atom
overview
issues
pulls
pipelines
nginx module: improve documentation
Robin Gloster
9 years ago
5dd7cf96
de8008a1
+31
-7
2 changed files
expand all
collapse all
unified
split
nixos
modules
services
web-servers
nginx
default.nix
vhost-options.nix
+12
-3
nixos/modules/services/web-servers/nginx/default.nix
···
235
235
sslDhparam = mkOption {
236
236
type = types.nullOr types.path;
237
237
default = null;
238
238
-
example = literalExample "/path/to/dhparams.pem";
238
238
+
example = "/path/to/dhparams.pem";
239
239
description = "Path to DH parameters file.";
240
240
};
241
241
···
246
246
default = {
247
247
localhost = {};
248
248
};
249
249
-
example = [];
250
250
-
description = ''
249
249
+
example = literalExample ''
250
250
+
{
251
251
+
"hydra.example.com" = {
252
252
+
forceSSL = true;
253
253
+
enableACME = true;
254
254
+
locations."/" = {
255
255
+
proxyPass = "http://localhost:3000";
256
256
+
};
257
257
+
};
258
258
+
};
251
259
'';
260
260
+
description = "Declarative vhost config";
252
261
};
253
262
};
254
263
};
+19
-4
nixos/modules/services/web-servers/nginx/vhost-options.nix
···
21
21
type = types.nullOr types.int;
22
22
default = null;
23
23
description = ''
24
24
-
Port for the server. 80 for http
24
24
+
Port for the server. Defaults to 80 for http
25
25
and 443 for https (i.e. when enableSSL is set).
26
26
'';
27
27
};
···
109
109
basicAuth = mkOption {
110
110
type = types.attrsOf types.str;
111
111
default = {};
112
112
-
description = "user = password";
112
112
+
example = literalExample ''
113
113
+
{
114
114
+
user = "password";
115
115
+
};
116
116
+
'';
117
117
+
description = ''
118
118
+
Basic Auth protection for a vhost.
119
119
+
120
120
+
WARNING: This is implemented to store the password in plain text in the
121
121
+
nix store.
122
122
+
'';
113
123
};
114
124
115
125
locations = mkOption {
···
117
127
inherit lib;
118
128
}));
119
129
default = {};
120
120
-
example = {};
121
121
-
description = ''
130
130
+
example = literalExample ''
131
131
+
{
132
132
+
"/" = {
133
133
+
proxyPass = "http://localhost:3000";
134
134
+
};
135
135
+
};
122
136
'';
137
137
+
description = "Declarative location config";
123
138
};
124
139
};
125
140
}