stockholm/tv/2configs/nginx/public_html.nix

22 lines
486 B
Nix
Raw Normal View History

2016-02-14 15:43:44 +00:00
{ config, lib, ... }:
2016-02-01 16:18:07 +00:00
2016-10-20 18:54:38 +00:00
with import <stockholm/lib>;
2016-02-01 16:18:07 +00:00
{
services.nginx = {
2016-02-01 16:18:07 +00:00
enable = true;
virtualHosts.default = {
serverAliases = [
2016-12-22 20:53:09 +00:00
"localhost"
"${config.krebs.build.host.name}"
"${config.krebs.build.host.name}.gg23"
2016-12-22 20:53:09 +00:00
"${config.krebs.build.host.name}.r"
];
locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
alias /home/$1/public_html$2;
'';
2016-12-22 20:53:09 +00:00
};
2016-02-01 16:18:07 +00:00
};
2016-06-29 22:52:35 +00:00
tv.iptables.input-internet-accept-tcp = singleton "http";
2016-02-01 16:18:07 +00:00
}