nginx: simplify ssl settings

This commit is contained in:
Bloxx12 2025-04-09 15:31:18 +02:00
commit afafd02d9a
2 changed files with 6 additions and 12 deletions

View file

@ -33,19 +33,9 @@ in {
services.nginx = { services.nginx = {
enable = true; enable = true;
virtualHosts.${domain} = { virtualHosts.${domain} = {
forceSSL = true; addSSL = true;
# enableACME = true; enableACME = true;
useACMEHost = domain;
inherit acmeRoot;
extraConfig = ''
# nginx defaults to a 1MB size limit for uploads, which
# *definitely* isn't enough for Git LFS.
# 'client_max_body_size 300m;' would set a limit of 300MB
# setting it to 0 means "no limit"
client_max_body_size 512M;
'';
locations."/" = { locations."/" = {
recommendedProxySettings = true;
proxyPass = "http://localhost:${toString port}"; proxyPass = "http://localhost:${toString port}";
}; };
}; };

View file

@ -27,6 +27,10 @@ in {
recommendedProxySettings = true; recommendedProxySettings = true;
recommendedZstdSettings = true; recommendedZstdSettings = true;
# nginx defaults to a 1MB size limit for uploads, which
# *definitely* isn't enough for Git LFS.
# 'client_max_body_size 300m;' would set a limit of 300MB
# setting it to 0 means "no limit"
clientMaxBodySize = mkDefault "512m"; clientMaxBodySize = mkDefault "512m";
}; };
}; };