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
sslDhparam = mkOption {
236
type = types.nullOr types.path;
237
default = null;
238
-
example = literalExample "/path/to/dhparams.pem";
239
description = "Path to DH parameters file.";
240
};
241
···
246
default = {
247
localhost = {};
248
};
249
-
example = [];
250
-
description = ''
0
0
0
0
0
0
0
0
251
'';
0
252
};
253
};
254
};
···
235
sslDhparam = mkOption {
236
type = types.nullOr types.path;
237
default = null;
238
+
example = "/path/to/dhparams.pem";
239
description = "Path to DH parameters file.";
240
};
241
···
246
default = {
247
localhost = {};
248
};
249
+
example = literalExample ''
250
+
{
251
+
"hydra.example.com" = {
252
+
forceSSL = true;
253
+
enableACME = true;
254
+
locations."/" = {
255
+
proxyPass = "http://localhost:3000";
256
+
};
257
+
};
258
+
};
259
'';
260
+
description = "Declarative vhost config";
261
};
262
};
263
};
+19
-4
nixos/modules/services/web-servers/nginx/vhost-options.nix
···
21
type = types.nullOr types.int;
22
default = null;
23
description = ''
24
-
Port for the server. 80 for http
25
and 443 for https (i.e. when enableSSL is set).
26
'';
27
};
···
109
basicAuth = mkOption {
110
type = types.attrsOf types.str;
111
default = {};
112
-
description = "user = password";
0
0
0
0
0
0
0
0
0
0
113
};
114
115
locations = mkOption {
···
117
inherit lib;
118
}));
119
default = {};
120
-
example = {};
121
-
description = ''
0
0
0
0
122
'';
0
123
};
124
};
125
}
···
21
type = types.nullOr types.int;
22
default = null;
23
description = ''
24
+
Port for the server. Defaults to 80 for http
25
and 443 for https (i.e. when enableSSL is set).
26
'';
27
};
···
109
basicAuth = mkOption {
110
type = types.attrsOf types.str;
111
default = {};
112
+
example = literalExample ''
113
+
{
114
+
user = "password";
115
+
};
116
+
'';
117
+
description = ''
118
+
Basic Auth protection for a vhost.
119
+
120
+
WARNING: This is implemented to store the password in plain text in the
121
+
nix store.
122
+
'';
123
};
124
125
locations = mkOption {
···
127
inherit lib;
128
}));
129
default = {};
130
+
example = literalExample ''
131
+
{
132
+
"/" = {
133
+
proxyPass = "http://localhost:3000";
134
+
};
135
+
};
136
'';
137
+
description = "Declarative location config";
138
};
139
};
140
}