about summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ops/modules/www/code.tvl.fyi.nix12
1 files changed, 11 insertions, 1 deletions
diff --git a/ops/modules/www/code.tvl.fyi.nix b/ops/modules/www/code.tvl.fyi.nix
index 3f34a9422c..5a7a9193ae 100644
--- a/ops/modules/www/code.tvl.fyi.nix
+++ b/ops/modules/www/code.tvl.fyi.nix
@@ -1,4 +1,4 @@
-{ depot, config, ... }:
+{ depot, pkgs, config, ... }:
 
 {
   imports = [
@@ -20,6 +20,16 @@
             alias ${depot.tvix.docs.svg}/component-flow.svg;
         }
 
+        location = /go-get/tvix/store/protos {
+            alias ${pkgs.writeText "go-import-metadata.html" ''<html><meta name="go-import" content="code.tvl.fyi/tvix/store/protos git https://code.tvl.fyi/depot.git:/tvix/store/protos.git"></html>''};
+        }
+
+        location = /tvix/store/protos {
+            if ($args ~* "/?go-get=1") {
+                return 302 /go-get/tvix/store/protos;
+            }
+        }
+
         # Git operations on depot.git hit josh
         location /depot.git {
             proxy_pass http://localhost:${toString config.services.depot.josh.port};