diff options
Diffstat (limited to 'ops')
-rw-r--r-- | ops/machines/whitby/default.nix | 1 | ||||
-rw-r--r-- | ops/modules/www/tvix.dev.nix | 39 |
2 files changed, 40 insertions, 0 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index 4fcce39fccef..2d3209a676a7 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -44,6 +44,7 @@ in (mod "www/status.tvl.su.nix") (mod "www/tazj.in.nix") (mod "www/todo.tvl.fyi.nix") + (mod "www/tvix.dev.nix") (mod "www/tvixbolt.tvl.su.nix") (mod "www/tvl.fyi.nix") (mod "www/tvl.su.nix") diff --git a/ops/modules/www/tvix.dev.nix b/ops/modules/www/tvix.dev.nix new file mode 100644 index 000000000000..f86f5b3b1e98 --- /dev/null +++ b/ops/modules/www/tvix.dev.nix @@ -0,0 +1,39 @@ +{ depot, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."tvix.dev" = { + serverName = "tvix.dev"; + enableACME = true; + forceSSL = true; + root = depot.tvix.website; + + extraConfig = '' + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; + ''; + }; + + services.nginx.virtualHosts."docs.tvix.dev" = { + serverName = "docs.tvix.dev"; + enableACME = true; + forceSSL = true; + + extraConfig = '' + add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always; + + location = / { + # until we have a better default page here + return 301 https://docs.tvix.dev/rust/tvix_eval/index.html; + } + + location /rust/ { + alias ${depot.tvix.rust-docs}/; + } + ''; + }; + }; +} |