diff options
author | Alan Pearce | 2024-06-26 21:20:09 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-26 21:21:24 +0200 |
commit | a8b679b21cfe5c2812f618022d7d0254e112c8bf (patch) | |
tree | 160c616eed4600b83a8728d1e4fe8fef604251cf /system | |
parent | 1660d5ae86989137202946b8319af33215393509 (diff) | |
download | nixfiles-a8b679b21cfe5c2812f618022d7d0254e112c8bf.tar.lz nixfiles-a8b679b21cfe5c2812f618022d7d0254e112c8bf.tar.zst nixfiles-a8b679b21cfe5c2812f618022d7d0254e112c8bf.zip |
prefect: set up caddy for local https
Diffstat (limited to 'system')
-rw-r--r-- | system/prefect.nix | 1 | ||||
-rw-r--r-- | system/settings/dev.nix | 40 |
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 + } + } + ''; + }; + }; + }; +} |