diff options
Diffstat (limited to '')
-rw-r--r-- | ops/nixos/www/code.tvl.fyi.nix | 27 |
1 files changed, 27 insertions, 0 deletions
diff --git a/ops/nixos/www/code.tvl.fyi.nix b/ops/nixos/www/code.tvl.fyi.nix new file mode 100644 index 000000000000..5ee33f39ca92 --- /dev/null +++ b/ops/nixos/www/code.tvl.fyi.nix @@ -0,0 +1,27 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts.cgit = { + serverName = "code.tvl.fyi"; + enableACME = true; + forceSSL = true; + + extraConfig = '' + # Static assets must always hit the root. + location ~ ^/(favicon\.ico|cgit\.(css|png))$ { + proxy_pass http://localhost:2448; + } + + # Everything else hits the depot directly. + location / { + proxy_pass http://localhost:2448/cgit.cgi/depot/; + } + ''; + }; + }; +} |