diff options
| author | makefu <github@syntax-fehler.de> | 2016-03-10 08:03:41 +0100 |
|---|---|---|
| committer | makefu <github@syntax-fehler.de> | 2016-03-10 08:03:41 +0100 |
| commit | 62b17b08ffebfbd628612be649e38fb7484718b6 (patch) | |
| tree | d9cc0eb019cd58502b15a7ca613885f64951decc /tv/2configs/nginx | |
| parent | a10580c2b2454885fb4d8be4fb1910b9addee000 (diff) | |
| parent | 20ad35c90045b51bc2e83587d0650a33467ea896 (diff) | |
Merge remote-tracking branch 'cd/master'
Diffstat (limited to 'tv/2configs/nginx')
| -rw-r--r-- | tv/2configs/nginx/default.nix | 17 | ||||
| -rw-r--r-- | tv/2configs/nginx/public_html.nix | 15 |
2 files changed, 32 insertions, 0 deletions
diff --git a/tv/2configs/nginx/default.nix b/tv/2configs/nginx/default.nix new file mode 100644 index 0000000..1fac65a --- /dev/null +++ b/tv/2configs/nginx/default.nix @@ -0,0 +1,17 @@ +{ config, lib, ... }: + +with config.krebs.lib; + +{ + krebs.nginx = { + servers.default.locations = [ + (nameValuePair "= /etc/os-release" '' + default_type text/plain; + alias /etc/os-release; + '') + ]; + }; + tv.iptables = optionalAttrs config.krebs.nginx.enable { + input-retiolum-accept-new-tcp = singleton "http"; + }; +} diff --git a/tv/2configs/nginx/public_html.nix b/tv/2configs/nginx/public_html.nix new file mode 100644 index 0000000..15a3b54 --- /dev/null +++ b/tv/2configs/nginx/public_html.nix @@ -0,0 +1,15 @@ +{ config, lib, ... }: + +with config.krebs.lib; + +{ + krebs.nginx = { + enable = true; + servers.default.locations = [ + (nameValuePair "~ ^/~(.+?)(/.*)?\$" '' + alias /home/$1/public_html$2; + '') + ]; + }; + tv.iptables.input-internet-accept-new-tcp = singleton "http"; +} |
