about summary refs log tree commit diff
path: root/ops/modules/www
diff options
context:
space:
mode:
authorFlorian Klink <flokli@flokli.de>2024-02-23T09·41+0700
committerclbot <clbot@tvl.fyi>2024-02-23T18·44+0000
commitf3faeae52aae8a3ab9cd0aee2c2a2ef9c904e483 (patch)
treeed312626f122f420ad45d2c2ddee1a4182e8d1df /ops/modules/www
parent5c3065b43a61a5fa019cbbb157984fc5eb81d439 (diff)
feat(ops/glesys): add bolt.tvix.dev r/7598
Make tvixbolt.tvl.su just serve a redirect to the new domain, and fold
everything into the tvix.dev.nix module.

Change-Id: I3a9ccf37d2ceee8886208d6f662e7598ce395b1a
Reviewed-on: https://cl.tvl.fyi/c/depot/+/11015
Reviewed-by: lukegb <lukegb@tvl.fyi>
Reviewed-by: tazjin <tazjin@tvl.su>
Autosubmit: flokli <flokli@flokli.de>
Tested-by: BuildkiteCI
Diffstat (limited to 'ops/modules/www')
-rw-r--r--ops/modules/www/tvix.dev.nix17
-rw-r--r--ops/modules/www/tvixbolt.tvl.su.nix19
2 files changed, 17 insertions, 19 deletions
diff --git a/ops/modules/www/tvix.dev.nix b/ops/modules/www/tvix.dev.nix
index f86f5b3b1e98..33c0bb002c75 100644
--- a/ops/modules/www/tvix.dev.nix
+++ b/ops/modules/www/tvix.dev.nix
@@ -17,6 +17,23 @@
       '';
     };
 
+    services.nginx.virtualHosts."bolt.tvix.dev" = {
+      root = depot.web.tvixbolt;
+      enableACME = true;
+      forceSSL = true;
+
+      extraConfig = ''
+        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
+      '';
+    };
+
+    # old domain, serve redirect
+    services.nginx.virtualHosts."tvixbolt.tvl.su" = {
+      enableACME = true;
+      forceSSL = true;
+      extraConfig = "return 301 https://bolt.tvix.dev$request_uri;";
+    };
+
     services.nginx.virtualHosts."docs.tvix.dev" = {
       serverName = "docs.tvix.dev";
       enableACME = true;
diff --git a/ops/modules/www/tvixbolt.tvl.su.nix b/ops/modules/www/tvixbolt.tvl.su.nix
deleted file mode 100644
index ef8ba0b11e7a..000000000000
--- a/ops/modules/www/tvixbolt.tvl.su.nix
+++ /dev/null
@@ -1,19 +0,0 @@
-{ depot, ... }:
-
-{
-  imports = [
-    ./base.nix
-  ];
-
-  config = {
-    services.nginx.virtualHosts."tvixbolt.tvl.su" = {
-      root = depot.web.tvixbolt;
-      enableACME = true;
-      forceSSL = true;
-
-      extraConfig = ''
-        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
-      '';
-    };
-  };
-}