From 7c16a7115654a2061ddfe61055eef181474eeab3 Mon Sep 17 00:00:00 2001 From: Vincent Ambo Date: Fri, 13 Aug 2021 03:50:10 +0300 Subject: feat(ops/www): Point images.tvl.* at Nixery Change-Id: I39f979c68e7b74f6da6a7da0f07aaa470886d451 Reviewed-on: https://cl.tvl.fyi/c/depot/+/3346 Tested-by: BuildkiteCI Reviewed-by: flokli Reviewed-by: sterni --- ops/machines/whitby/default.nix | 1 + ops/modules/www/images.tvl.fyi.nix | 22 ++++++++++++++++++++++ 2 files changed, 23 insertions(+) create mode 100644 ops/modules/www/images.tvl.fyi.nix (limited to 'ops') diff --git a/ops/machines/whitby/default.nix b/ops/machines/whitby/default.nix index a7aeaa677c..5b4ac3e1b5 100644 --- a/ops/machines/whitby/default.nix +++ b/ops/machines/whitby/default.nix @@ -26,6 +26,7 @@ in { "${depot.path}/ops/modules/www/cl.tvl.fyi.nix" "${depot.path}/ops/modules/www/code.tvl.fyi.nix" "${depot.path}/ops/modules/www/cs.tvl.fyi.nix" + "${depot.path}/ops/modules/www/images.tvl.fyi.nix" "${depot.path}/ops/modules/www/login.tvl.fyi.nix" "${depot.path}/ops/modules/www/status.tvl.su.nix" "${depot.path}/ops/modules/www/tazj.in.nix" diff --git a/ops/modules/www/images.tvl.fyi.nix b/ops/modules/www/images.tvl.fyi.nix new file mode 100644 index 0000000000..7d027b2991 --- /dev/null +++ b/ops/modules/www/images.tvl.fyi.nix @@ -0,0 +1,22 @@ +{ config, ... }: + +{ + imports = [ + ./base.nix + ]; + + config = { + services.nginx.virtualHosts."images.tvl.fyi" = { + serverName = "images.tvl.fyi"; + serverAliases = [ "images.tvl.su" ]; + enableACME = true; + forceSSL = true; + + extraConfig = '' + location / { + proxy_pass http://localhost:${toString config.services.depot.nixery.port}; + } + ''; + }; + }; +} -- cgit 1.4.1