{pkgs, outputs, ...}: { services = { nextcloud = { enable = true; package = pkgs.nextcloud29; hostName = "nextcloud.lunamoonlight.xyz"; datadir = "/mnt/nextcloud"; https = true; config = { adminuser = "luna"; adminpassFile = "/mnt/nextcloud/password.txt"; }; settings = { trusted_proxies = [ "127.0.0.1" ]; trusted_domains = [ "nextcloud.lunamoonlight.xyz" ]; overwriteprotocol = "https"; }; }; nginx.virtualHosts."nextcloud.lunamoonlight.xyz" = { enableACME = true; addSSL = true; locations."/" = { proxyWebsockets = true; extraConfig = " location /.well-known/carddav { return 301 $scheme://$host/remote.php/dav; } location /.well-known/caldav { return 301 $scheme://$host/remote.php/dav; } "; }; }; }; }