summaryrefslogtreecommitdiffstats
path: root/tv/2configs/nginx/public_html.nix
blob: cc7a398916f804a285fe75fb6a416095c671c95d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
{ config, lib, ... }:

with import <stockholm/lib>;

{
  services.nginx = {
    enable = true;
    virtualHosts.default = {
      serverAliases = [
        "localhost"
        "${config.krebs.build.host.name}"
        "${config.krebs.build.host.name}.gg23"
        "${config.krebs.build.host.name}.r"
      ];
      locations."~ ^/~(.+?)(/.*)?\$".extraConfig = ''
        alias /home/$1/public_html$2;
      '';
    };
  };
  tv.iptables.input-internet-accept-tcp = singleton "http";
}