nix-config/hosts/cirrus/nextcloud-proxy.nix

40 lines
913 B
Nix
Raw Normal View History

2022-06-26 21:05:53 +02:00
{ config, pkgs, ... }: {
security.acme = {
defaults.email = "acme@oxapentane.com";
acceptTerms = true;
};
networking.firewall.allowedTCPPorts = [ 80 443 ];
services.nginx = {
enable = true;
recommendedProxySettings = true;
recommendedGzipSettings = true;
recommendedTlsSettings = true;
recommendedOptimisation = true;
sslCiphers = "AES256+EECDH:AES256+EDH:!aNULL";
};
services.nginx.virtualHosts."nc.oxapentane.com" = {
enableACME = true;
forceSSL = true;
extraConfig = ''
client_max_body_size 512M;
'';
locations = {
"/" = {
2022-06-26 21:19:15 +02:00
# extraConfig = '' return 503; '';
proxyPass = "http://10.34.45.100:8080";
2022-06-26 21:05:53 +02:00
};
"/well-known/carddav" = {
2022-06-26 21:19:15 +02:00
return = "301 $scheme://$host/remote.php/dav";
2022-06-26 21:05:53 +02:00
};
"/well-known/caldav" = {
2022-06-26 21:19:15 +02:00
return = "301 $scheme://$host/remote.php/dav";
2022-06-26 21:05:53 +02:00
};
};
};
}