all repos — nixfiles @ a8b679b21cfe5c2812f618022d7d0254e112c8bf

System and user configuration, managed by nix and home-manager

prefect: set up caddy for local https

Alan Pearce
commit

a8b679b21cfe5c2812f618022d7d0254e112c8bf

parent

1660d5ae86989137202946b8319af33215393509

2 files changed, 41 insertions(+), 0 deletions(-)

jump to
M system/prefect.nixsystem/prefect.nix
@@ -23,6 +23,7 @@ ./settings/programs/base.nix
./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>
A 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 + } + } + ''; + }; + }; + }; +}