summaryrefslogtreecommitdiff
path: root/hosts
diff options
context:
space:
mode:
authorGrigory Shipunov2022-06-26 21:05:53 +0200
committerGrigory Shipunov2022-06-26 21:06:14 +0200
commit0300824d34449ccb337a942c10128e560a25872f (patch)
tree685ec3333c2a7e85c2ac881764577bd98c88f3ab /hosts
parent85c70bf43d07d821d4c5bc0c0cf8e87ef3e70085 (diff)
nextcloud-proxy: init
Diffstat (limited to 'hosts')
-rw-r--r--hosts/cirrus/default.nix1
-rw-r--r--hosts/cirrus/nextcloud-proxy.nix39
2 files changed, 40 insertions, 0 deletions
diff --git a/hosts/cirrus/default.nix b/hosts/cirrus/default.nix
index 7864357..25f57c8 100644
--- a/hosts/cirrus/default.nix
+++ b/hosts/cirrus/default.nix
@@ -4,5 +4,6 @@
./configuration.nix
./secrets.nix
./wireguard-server.nix
+ ./nextcloud-proxy.nix
];
}
diff --git a/hosts/cirrus/nextcloud-proxy.nix b/hosts/cirrus/nextcloud-proxy.nix
new file mode 100644
index 0000000..7e9a351
--- /dev/null
+++ b/hosts/cirrus/nextcloud-proxy.nix
@@ -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";
+ };
+
+ };
+ };
+}