feat(ops): serve Tvix website & docs on (docs.)tvix.dev
Change-Id: I198ea197867f9b9a48e51665d0665f722202e02e Reviewed-on: https://cl.tvl.fyi/c/depot/+/8299 Reviewed-by: flokli <flokli@flokli.de> Autosubmit: tazjin <tazjin@tvl.su> Tested-by: BuildkiteCI
This commit is contained in:
parent
231ed4c11e
commit
0965600fe6
2 changed files with 40 additions and 0 deletions
|
@ -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")
|
||||
|
|
39
ops/modules/www/tvix.dev.nix
Normal file
39
ops/modules/www/tvix.dev.nix
Normal file
|
@ -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}/;
|
||||
}
|
||||
'';
|
||||
};
|
||||
};
|
||||
}
|
Loading…
Reference in a new issue