diff options
Diffstat (limited to 'ymir.nix')
-rw-r--r-- | ymir.nix | 55 |
1 files changed, 55 insertions, 0 deletions
@@ -164,4 +164,59 @@ in { | |||
164 | ip4 = [ { address = "10.142.0.3"; prefixLength = 16; } ]; | 164 | ip4 = [ { address = "10.142.0.3"; prefixLength = 16; } ]; |
165 | }; | 165 | }; |
166 | }); | 166 | }); |
167 | |||
168 | services.nginx = { | ||
169 | enable = true; | ||
170 | httpConfig = '' | ||
171 | include mime.types; | ||
172 | default_type application/octet-stream; | ||
173 | |||
174 | log_format main | ||
175 | '$remote_addr - $remote_user [$time_local] ' | ||
176 | '"$request" $status $bytes_sent ' | ||
177 | '"$http_referer" "$http_user_agent" ' | ||
178 | '"$gzip_ratio"'; | ||
179 | |||
180 | client_header_timeout 10m; | ||
181 | client_body_timeout 10m; | ||
182 | send_timeout 10m; | ||
183 | |||
184 | connection_pool_size 256; | ||
185 | client_header_buffer_size 1k; | ||
186 | large_client_header_buffers 4 2k; | ||
187 | request_pool_size 4k; | ||
188 | |||
189 | gzip on; | ||
190 | gzip_min_length 1100; | ||
191 | gzip_buffers 4 8k; | ||
192 | gzip_types text/plain; | ||
193 | |||
194 | output_buffers 1 32k; | ||
195 | postpone_output 1460; | ||
196 | |||
197 | sendfile on; | ||
198 | tcp_nopush on; | ||
199 | tcp_nodelay on; | ||
200 | |||
201 | keepalive_timeout 75 20; | ||
202 | |||
203 | ignore_invalid_headers on; | ||
204 | |||
205 | include hosts/*.conf; | ||
206 | ''; | ||
207 | }; | ||
208 | environment.etc."etc/nginx/mime.types" = { | ||
209 | source = ./custom/mime.types; | ||
210 | }; | ||
211 | environment.etc."etc/nginx/hosts/dirty-haskell.conf" = { | ||
212 | text = '' | ||
213 | server { | ||
214 | listen *:80; | ||
215 | listen [::]:80; | ||
216 | server_name dirty-haskell.org www.dirty-haskell.org; | ||
217 | |||
218 | root /srv/www/dirty-haskell.org; | ||
219 | } | ||
220 | ''; | ||
221 | }; | ||
167 | } | 222 | } |