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

with pkgs.stockholm.lib;

{
  services.nginx = {
    enable = true;
    virtualHosts.default = {
      default = true;
      locations = {
        "~ ^/~(.+?)(/.*)?\$".extraConfig = ''
          alias /home/$1/public_html$2;
          autoindex on;
        '';
      };
    };
  };
}