about summary refs log tree commit diff
path: root/ops/nixos/www
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-03-31T22·49+0200
committertazjin <mail@tazj.in>2021-03-31T23·10+0000
commit53d8dd6a1e56533dbe33a711bdec792cd477f0c7 (patch)
treecddcd151fde7b448df5f554ca1eab97d7686e5a5 /ops/nixos/www
parent811fff2d8b43cab0d15f32016c3d0572ffa9db77 (diff)
feat(ops/nixos/www): Serve rendered Tvix component SVG (hack!) r/2381
This is a quick hack to make it possible to view the rendered SVG on
https://code.tvl.fyi/about/tvix/docs/components.md

We want to be able to do this sort of thing dynamically in the future,
but we can't yet, so ... well. Deal with it.

Change-Id: Id2b819679d748b6f517018a9c6e72d5c1d806c4c
Reviewed-on: https://cl.tvl.fyi/c/depot/+/2743
Reviewed-by: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'ops/nixos/www')
-rw-r--r--ops/nixos/www/code.tvl.fyi.nix7
1 files changed, 7 insertions, 0 deletions
diff --git a/ops/nixos/www/code.tvl.fyi.nix b/ops/nixos/www/code.tvl.fyi.nix
index 5ee33f39ca92..e16c0512d962 100644
--- a/ops/nixos/www/code.tvl.fyi.nix
+++ b/ops/nixos/www/code.tvl.fyi.nix
@@ -12,6 +12,13 @@
       forceSSL = true;
 
       extraConfig = ''
+        # Serve the rendered Tvix component SVG.
+        #
+        # TODO(tazjin): Implement a way of serving this dynamically
+        location = /about/tvix/docs/component-flow.svg {
+            alias ${config.depot.tvix.docs.svg}/component-flow.svg;
+        }
+
         # Static assets must always hit the root.
         location ~ ^/(favicon\.ico|cgit\.(css|png))$ {
            proxy_pass http://localhost:2448;