File tree Expand file tree Collapse file tree 2 files changed +44
-6
lines changed
nixos/modules/services/web-servers/h2o Expand file tree Collapse file tree 2 files changed +44
-6
lines changed Original file line number Diff line number Diff line change 230230 ssl = ( lib . recursiveUpdate tlsRecAttrs value . tls . extraSettings ) // {
231231 inherit identity ;
232232 } ;
233+ }
234+ // lib . optionalAttrs ( value . host != null ) {
235+ host = value . host ;
233236 } ;
234237 } ;
235238 } ;
302305 type = settingsFormat . type ;
303306 default = { } ;
304307 description = "Configuration for H2O (see <https://h2o.examp1e.net/configure.html>)" ;
308+ example =
309+ literalExpression
310+ # nix
311+ ''
312+ {
313+ compress = "ON";
314+ ssl-offload = "kernel";
315+ http2-reprioritize-blocking-assets = "ON";
316+ "file.mime.addtypes" = {
317+ "text/x-rst" = {
318+ extensions = [ ".rst" ];
319+ is_compressible = "YES";
320+ };
321+ };
322+ }
323+ '' ;
305324 } ;
306325
307326 hosts = mkOption {
Original file line number Diff line number Diff line change 3333 "example.org"
3434 ] ;
3535 description = ''
36- Additional names of virtual hosts served by this virtual host configuration.
36+ Additional names of virtual hosts served by this virtual host
37+ configuration.
38+ '' ;
39+ } ;
40+
41+ host = mkOption {
42+ type = types . nullOr types . nonEmptyStr ;
43+ default = null ;
44+ example = "127.0.0.1" ;
45+ description = ''
46+ Set the host address for this virtual host. If unset, the default is to
47+ listen on all network interfaces.
3748 '' ;
3849 } ;
3950
7081 config.services.h2o.defaultTLSListenPort
7182 '' ;
7283 description = ''
73- Override the default TLS port for this virtual host.";
84+ Override the default TLS port for this virtual host.
7485 '' ;
7586 example = 8443 ;
7687 } ;
105116 options = {
106117 key-file = mkOption {
107118 type = types . path ;
108- description = "Path to key file" ;
119+ description = ''
120+ Path to key file. See
121+ <https://h2o.examp1e.net/configure/base_directives.html#key-file>.
122+ '' ;
109123 } ;
110124 certificate-file = mkOption {
111125 type = types . path ;
112- description = "Path to certificate file" ;
126+ description = ''
127+ Path to certificate file. See
128+ <https://h2o.examp1e.net/configure/base_directives.html#certificate-file>.
129+ '' ;
113130 } ;
114131 } ;
115132 }
139156 type = types . attrs ;
140157 default = { } ;
141158 description = ''
142- Additional TLS/SSL-related configuration options.
159+ Additional TLS/SSL-related configuration options. See
160+ <https://h2o.examp1e.net/configure/base_directives.html#listen-ssl>.
143161 '' ;
144162 example =
145163 literalExpression
205223 default = { } ;
206224 description = ''
207225 Attrset to be transformed into YAML for host config. Note that the HTTP
208- / TLS configurations will override these config values.
226+ / TLS configurations will override these config values. See
227+ <https://h2o.examp1e.net/configure/base_directives.html#hosts>.
209228 '' ;
210229 } ;
211230 } ;
You can’t perform that action at this time.
0 commit comments