about summary refs log tree commit diff
path: root/ops
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-09-30T20·12+0300
committertazjin <mail@tazj.in>2021-10-01T15·24+0000
commitce575bf65bb73a8e55a26701879a39b52d67c200 (patch)
treef1396d33d9b245ae1d6f9d1d078f57781e49e63c /ops
parent9cad12aeb79e3b45fad012e5f93919c2ec25278f (diff)
feat(whitby): Serve //corp/website on tvl.su r/2941
Change-Id: I21e1ddf9a32568cac8ad2595869ac8670867efa9
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3658
Tested-by: BuildkiteCI
Reviewed-by: tazjin <mail@tazj.in>
Diffstat (limited to 'ops')
-rw-r--r--ops/machines/whitby/default.nix1
-rw-r--r--ops/modules/www/tvl.su.nix20
2 files changed, 21 insertions, 0 deletions
diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix
index 7cc529c7f8..148c0d15a6 100644
--- a/ops/machines/whitby/default.nix
+++ b/ops/machines/whitby/default.nix
@@ -36,6 +36,7 @@ in {
     "${depot.path}/ops/modules/www/tazj.in.nix"
     "${depot.path}/ops/modules/www/todo.tvl.fyi.nix"
     "${depot.path}/ops/modules/www/tvl.fyi.nix"
+    "${depot.path}/ops/modules/www/tvl.su.nix"
     "${depot.path}/ops/modules/www/wigglydonke.rs.nix"
     "${pkgs.path}/nixos/modules/services/web-apps/gerrit.nix"
   ];
diff --git a/ops/modules/www/tvl.su.nix b/ops/modules/www/tvl.su.nix
new file mode 100644
index 0000000000..a7c4f6a217
--- /dev/null
+++ b/ops/modules/www/tvl.su.nix
@@ -0,0 +1,20 @@
+{ depot, ... }:
+
+{
+  imports = [
+    ./base.nix
+  ];
+
+  config = {
+    services.nginx.virtualHosts."tvl.su" = {
+      serverName = "tvl.su";
+      root = depot.corp.website;
+      enableACME = true;
+      forceSSL = true;
+
+      extraConfig = ''
+        add_header Strict-Transport-Security "max-age=31536000; includeSubDomains; preload" always;
+      '';
+    };
+  };
+}