summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rw-r--r--system/prefect.nix1
-rw-r--r--system/settings/dev.nix40
2 files changed, 41 insertions, 0 deletions
diff --git a/system/prefect.nix b/system/prefect.nix
index 801692e3..abee00fd 100644
--- a/system/prefect.nix
+++ b/system/prefect.nix
@@ -23,6 +23,7 @@
     ./settings/programs/kde.nix
     ./settings/programs/shell.nix
     ./settings/programs/docker.nix
+    ./settings/dev.nix
     ./settings/gaming.nix
     <nixos-hardware/common/cpu/amd>
     <nixos-hardware/common/cpu/amd/pstate.nix>
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
+            }
+          }
+        '';
+      };
+    };
+  };
+}