summary refs log tree commit diff stats
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/settings/dev.nix32
1 files changed, 25 insertions, 7 deletions
diff --git a/system/settings/dev.nix b/system/settings/dev.nix
index e975c214..8d246c15 100644
--- a/system/settings/dev.nix
+++ b/system/settings/dev.nix
@@ -1,7 +1,13 @@
 { config
+, lib
 , pkgs
 , ...
 }: {
+  networking = lib.mkIf pkgs.stdenv.isLinux {
+    hosts = {
+      "127.0.0.80" = [ "alanpearce.test" ];
+    };
+  };
   services.caddy = {
     enable = true;
     virtualHosts = {
@@ -12,17 +18,29 @@
               ca local
             }
           }
-          acme_server
+          acme_server {
+            allow {
+              domains *.test
+            }
+          }
         '';
       };
-      "alanpearce.localhost" = {
+      "alanpearce.test" = {
+        serverAliases = [ "alanpearce.localhost" ];
         extraConfig = ''
-          reverse_proxy h2c://alanpearce.localhost:3000 {
-              transport http {
-                dial_timeout 1s
-                compression off
-              }
+          tls {
+            issuer internal {
+              ca local
             }
+          }
+          reverse_proxy http://alanpearce.test:3000 {
+            header_up Host alanpearce.test
+            transport http {
+              dial_timeout 1s
+              compression off
+            }
+          }
+          redir / https://alanpearce.test:8443 302
         '';
       };
       "searchix.localhost" = {