dot.nix/host/caenus/modules/nginx/default.nix
Chris Toph 2042a0f11f Complete Merge of all Hosts
WIP but should should be mostly working
2024-09-22 01:07:26 -04:00

36 lines
No EOL
1 KiB
Nix

{
users.users.nginx.extraGroups = [ "acme" ];
# Nginx
services.nginx = {
enable = true;
# Use recommended settings
recommendedGzipSettings = true;
recommendedOptimisation = true;
recommendedProxySettings = true;
recommendedTlsSettings = true;
virtualHosts = {
"ryot.foo" = {
http2 = true;
forceSSL = true;
useACMEHost = "ryot.foo";
locations."/".proxyPass = "http://0.0.0.0:8080";
};
"*.ryot.foo" = {
http2 = true;
forceSSL = true;
useACMEHost = "ryot.foo";
locations."/" = {
proxyPass = "http://0.0.0.0:8080";
proxyWebsockets = true;
extraConfig = ''
proxy_ssl_server_name on;
proxy_pass_header Authorization;
'';
};
};
};
};
}