stockholm/tv/2configs/nginx/public_html.nix
2021-02-11 23:21:11 +01:00

22 lines
482 B
Nix

{ config, lib, ... }:
with import <stockholm/lib>;
{
services.nginx = {
enable = true;
virtualHosts.default = {
serverAliases = [
"localhost"
"${config.krebs.build.host.name}"
"${config.krebs.build.host.name}.hkw"
"${config.krebs.build.host.name}.r"
];
locations."~ ^/~([a-z]+)(?:/(.*))?\$" = {
alias = "/srv/$1/public_html/$2";
};
};
};
tv.iptables.input-internet-accept-tcp = singleton "http";
}