about summary refs log tree commit diff
path: root/ops/modules/www/nixery.dev.nix
diff options
context:
space:
mode:
authorVincent Ambo <mail@tazj.in>2021-08-24T11·07+0300
committertazjin <mail@tazj.in>2021-08-24T11·30+0000
commitf218f2fd56a9247a8a33ef2a8c22de9c4d22fb5e (patch)
tree8953f303c352f29dabdafbc2bf84fa5f0ba26cae /ops/modules/www/nixery.dev.nix
parentb033871638f09dfb24e67b04b6e8e02d2b964cb4 (diff)
feat(ops): Serve nixery.dev from whitby r/2751
Adds a new module for the nixery.dev domain and serves it from whitby.
Note that the DNS records do *not* point to whitby yet, so deploying
this will lead to a failed TLS provisioning unit - but this is
intentional.

Change-Id: I911f67a0aa24f8df3cb52d2cfc49a8b6132cf718
Reviewed-on: https://cl.tvl.fyi/c/depot/+/3383
Tested-by: BuildkiteCI
Reviewed-by: sterni <sternenseemann@systemli.org>
Diffstat (limited to '')
-rw-r--r--ops/modules/www/nixery.dev.nix21
1 files changed, 21 insertions, 0 deletions
diff --git a/ops/modules/www/nixery.dev.nix b/ops/modules/www/nixery.dev.nix
new file mode 100644
index 0000000000..05dc88c66a
--- /dev/null
+++ b/ops/modules/www/nixery.dev.nix
@@ -0,0 +1,21 @@
+{ config, ... }:
+
+{
+  imports = [
+    ./base.nix
+  ];
+
+  config = {
+    services.nginx.virtualHosts."nixery.dev" = {
+      serverName = "nixery.dev";
+      enableACME = true;
+      forceSSL = true;
+
+      extraConfig = ''
+        location / {
+          proxy_pass http://localhost:${toString config.services.depot.nixery.port};
+        }
+      '';
+    };
+  };
+}