summaryrefslogtreecommitdiff
path: root/config/services/web/git/default.nix
blob: 213fed9d349e4f305651b80868bc4b02490c2752 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
{ config, pkgs, ... }:
{
  services.nginx = {
    additionalModules = [ pkgs.nginxModules.subsFilter ];
    virtualHosts.git = {
      serverName = "git.${config.networking.domain}";
      enableACME = true;
      forceSSL = true;
      locations."/" = {
        proxyPass = "http://hephaistos.aristote.mesh/git/";
        extraConfig = ''
          proxy_redirect default;
          sub_filter_once off;
          sub_filter 'href=\'/git/' 'href=\'/';
          sub_filter 'action=\'/git/' 'action=\'/';
        '';
      };
    };
  };
}