diff options
author | tv <tv@krebsco.de> | 2016-02-04 01:31:21 +0100 |
---|---|---|
committer | tv <tv@krebsco.de> | 2016-02-04 01:31:21 +0100 |
commit | e2a922dd7d2ab1f3e24a5d54c641c9ce6f51865d (patch) | |
tree | 361d2db5f8226a5b9d6aea80e9b7e55a7a845bed /makefu/2configs/nginx/omo-share.nix | |
parent | 48381bd8dd9607d54a936c644964ab5bac90e4a9 (diff) | |
parent | b38a821c31de84af6567073bd65ac76c5fc02b5d (diff) |
Merge remote-tracking branch 'gum/master'
Diffstat (limited to 'makefu/2configs/nginx/omo-share.nix')
-rw-r--r-- | makefu/2configs/nginx/omo-share.nix | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/makefu/2configs/nginx/omo-share.nix b/makefu/2configs/nginx/omo-share.nix new file mode 100644 index 000000000..ce85e0442 --- /dev/null +++ b/makefu/2configs/nginx/omo-share.nix @@ -0,0 +1,34 @@ +{ config, lib, pkgs, ... }: + +with lib; +let + hostname = config.krebs.build.host.name; + # TODO local-ip from the nets config + local-ip = "192.168.1.11"; + # local-ip = head config.krebs.build.host.nets.retiolum.addrs4; +in { + krebs.nginx = { + enable = mkDefault true; + servers = { + omo-share = { + listen = [ "${local-ip}:80" ]; + locations = singleton (nameValuePair "/" '' + autoindex on; + root /media; + limit_rate_after 100m; + limit_rate 5m; + mp4_buffer_size 4M; + mp4_max_buffer_size 10M; + allow all; + access_log off; + keepalive_timeout 65; + keepalive_requests 200; + reset_timedout_connection on; + sendfile on; + tcp_nopush on; + gzip off; + ''); + }; + }; + }; +} |