summary refs log tree commit diff stats
path: root/system/settings
diff options
context:
space:
mode:
Diffstat (limited to 'system/settings')
-rw-r--r--system/settings/dev.nix40
1 files changed, 40 insertions, 0 deletions
diff --git a/system/settings/dev.nix b/system/settings/dev.nix
new file mode 100644
index 00000000..e975c214
--- /dev/null
+++ b/system/settings/dev.nix
@@ -0,0 +1,40 @@
+{ config
+, pkgs
+, ...
+}: {
+  services.caddy = {
+    enable = true;
+    virtualHosts = {
+      "localhost" = {
+        extraConfig = ''
+          tls {
+            issuer internal {
+              ca local
+            }
+          }
+          acme_server
+        '';
+      };
+      "alanpearce.localhost" = {
+        extraConfig = ''
+          reverse_proxy h2c://alanpearce.localhost:3000 {
+              transport http {
+                dial_timeout 1s
+                compression off
+              }
+            }
+        '';
+      };
+      "searchix.localhost" = {
+        extraConfig = ''
+          reverse_proxy http://localhost:7331 {
+            transport http {
+              dial_timeout 1s
+              compression off
+            }
+          }
+        '';
+      };
+    };
+  };
+}