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

with import <stockholm/lib>;

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