diff options
Diffstat (limited to 'system/settings/dev.nix')
-rw-r--r-- | system/settings/dev.nix | 59 |
1 files changed, 59 insertions, 0 deletions
diff --git a/system/settings/dev.nix b/system/settings/dev.nix new file mode 100644 index 00000000..b1817914 --- /dev/null +++ b/system/settings/dev.nix @@ -0,0 +1,59 @@ +{ ... }: { + services.caddy = { + enable = true; + virtualHosts = + let + local_tls = '' + tls { + issuer internal { + ca local + } + } + ''; + in + { + "localhost" = { + logFormat = "output discard"; + extraConfig = '' + ${local_tls} + acme_server { + allow { + domains *.test *.localhost + } + } + ''; + }; + # need to test forwarding behaviour + "https://alanpearce.localhost" = { + logFormat = "output discard"; + serverAliases = [ + "http://alanpearce.localhost" + + # remember to update /etc/hosts + "https://alanpearce.test" + "http://alanpearce.test" + ]; + extraConfig = '' + ${local_tls} + reverse_proxy http://alanpearce.test:8080 { + transport http { + dial_timeout 1s + compression off + } + } + ''; + }; + "searchix.localhost" = { + logFormat = "output discard"; + extraConfig = '' + reverse_proxy http://localhost:7331 { + transport http { + dial_timeout 1s + compression off + } + } + ''; + }; + }; + }; +} |