summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregor Kleen <gkleen@yggdrasil.li>2015-11-07 21:34:35 +0000
committerGregor Kleen <gkleen@yggdrasil.li>2015-11-07 21:34:35 +0000
commit72e7eff45ca594035fbe1e7edcc725398d69d278 (patch)
treed099667006d4f5998d9790255eab837abed9f9a3
parent2e197f1eb606cc7244d7e863086dcdfcfc5ccc2e (diff)
parente5899248bf45759565eb0bc2888dcedb3a6a63e8 (diff)
downloadnixos-72e7eff45ca594035fbe1e7edcc725398d69d278.tar
nixos-72e7eff45ca594035fbe1e7edcc725398d69d278.tar.gz
nixos-72e7eff45ca594035fbe1e7edcc725398d69d278.tar.bz2
nixos-72e7eff45ca594035fbe1e7edcc725398d69d278.tar.xz
nixos-72e7eff45ca594035fbe1e7edcc725398d69d278.zip
Merge branch 'master' of git.yggdrasil.li:nixos
-rw-r--r--custom/ymir.nginx62
-rw-r--r--ymir.nix9
2 files changed, 69 insertions, 2 deletions
diff --git a/custom/ymir.nginx b/custom/ymir.nginx
new file mode 100644
index 00000000..1fb0afcb
--- /dev/null
+++ b/custom/ymir.nginx
@@ -0,0 +1,62 @@
1default_type application/octet-stream;
2
3log_format main
4 '$remote_addr - $remote_user [$time_local] '
5 '"$request" $status $bytes_sent '
6 '"$http_referer" "$http_user_agent" '
7 '"$gzip_ratio"';
8
9client_header_timeout 10m;
10client_body_timeout 10m;
11send_timeout 10m;
12
13connection_pool_size 256;
14client_header_buffer_size 1k;
15large_client_header_buffers 4 2k;
16request_pool_size 4k;
17
18gzip on;
19gzip_min_length 1100;
20gzip_buffers 4 8k;
21gzip_types text/plain;
22
23output_buffers 1 32k;
24postpone_output 1460;
25
26sendfile on;
27tcp_nopush on;
28tcp_nodelay on;
29
30keepalive_timeout 75 20;
31
32ignore_invalid_headers on;
33
34server {
35 listen *:80;
36 listen [::]:80;
37 server_name dirty-haskell.org www.dirty-haskell.org;
38
39 root /srv/www/dirty-haskell.org;
40}
41
42server {
43 listen *:443 ssl;
44 listen [::]:443 ssl;
45 server_name dirty-haskell.org;
46
47 ssl_certificate /etc/nginx/ssl/dirty-haskell.org/fullchain.pem;
48 ssl_certificate_key /etc/nginx/ssl/dirty-haskell.org/privkey.pem;
49
50 root /srv/www/dirty-haskell.org;
51}
52
53server {
54 listen *:443 ssl;
55 listen [::]:443 ssl;
56 server_name www.dirty-haskell.org;
57
58 ssl_certificate /etc/nginx/ssl/www.dirty-haskell.org/fullchain.pem;
59 ssl_certificate_key /etc/nginx/ssl/www.dirty-haskell.org/privkey.pem;
60
61 root /srv/www/dirty-haskell.org;
62}
diff --git a/ymir.nix b/ymir.nix
index c64dea38..808b11bb 100644
--- a/ymir.nix
+++ b/ymir.nix
@@ -64,6 +64,8 @@ in {
64 5269 # xmpp.s2s 64 5269 # xmpp.s2s
65 655 # tinc.yggdrasil 65 655 # tinc.yggdrasil
66 656 # tinc.laeradhr 66 656 # tinc.laeradhr
67 80 # http
68 443 # https
67 ]; 69 ];
68 allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh 70 allowedUDPPortRanges = [ { from = 60000; to = 61000; } # mosh
69 ]; 71 ];
@@ -88,10 +90,8 @@ in {
88 }; 90 };
89 91
90 nix.binaryCaches = [ "https://cache.nixos.org/" 92 nix.binaryCaches = [ "https://cache.nixos.org/"
91 "https://hydra.nixos.org/"
92 ]; 93 ];
93 nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY=" 94 nix.binaryCachePublicKeys = [ "cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY="
94 "hydra.nixos.org-1:CNHJZBh9K4tP3EKF6FkkgeVYsS3ohTl+oS0Qa8bezVs="
95 ]; 95 ];
96 96
97 # List services that you want to enable: 97 # List services that you want to enable:
@@ -164,4 +164,9 @@ 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 = builtins.readFile ./custom/ymir.nginx;
171 };
167} 172}