nextcloud-proxy: init

This commit is contained in:
Grigory Shipunov 2022-06-26 21:05:53 +02:00
parent 85c70bf43d
commit 0300824d34
Signed by: 0xa
GPG key ID: 91FA5E5BF9AA901C
2 changed files with 40 additions and 0 deletions

View file

@ -4,5 +4,6 @@
./configuration.nix
./secrets.nix
./wireguard-server.nix
./nextcloud-proxy.nix
];
}

View file

@ -0,0 +1,39 @@
{ 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 = {
"/" = {
# extraConfig = '' return 503; '';
proxyPass = "http://10.34.45.100:8080";
};
"/well-known/carddav" = {
return = "301 $scheme://$host/remote.php/dav";
};
"/well-known/caldav" = {
return = "301 $scheme://$host/remote.php/dav";
};
};
};
}