nixpkgs/systems/hikari/web-development/projects/service-wrapper.nix
Daniel Siepmann 3fbb26a6f6
Improve web development setup
Group kinds of projects in files.
Hide info for customers via git crypt.
Solve todo to auto generate permissions for databases.
2023-03-08 08:37:56 +01:00

29 lines
704 B
Nix

{ pkgs, lib, config, ... }:
let
domain = "mailhog.localhost";
in {
services = {
httpd.virtualHosts.${domain} = {
forceSSL = true;
sslServerCert = "${config.custom.web-development.certFolder}${domain}.pem";
sslServerKey = "${config.custom.web-development.certFolder}${domain}-key.pem";
extraConfig = ''
RequestHeader unset Authorization
ProxyRequests Off
ProxyPreserveHost On
ProxyPass / http://localhost:8025/
ProxyPassReverse / http://localhost:8025/
# Mailhog specific
<LocationMatch /api/v2/websocket>
ProxyPass ws://localhost:8025/api/v2/websocket
</LocationMatch>
'';
};
};
}