From a8b679b21cfe5c2812f618022d7d0254e112c8bf Mon Sep 17 00:00:00 2001 From: Alan Pearce Date: Wed, 26 Jun 2024 21:20:09 +0200 Subject: prefect: set up caddy for local https --- system/settings/dev.nix | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) create mode 100644 system/settings/dev.nix (limited to 'system/settings') 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 + } + } + ''; + }; + }; + }; +} -- cgit 1.4.1