diff --git a/modules/nextcloud.nix b/modules/nextcloud.nix index b775c51..94dc1e6 100644 --- a/modules/nextcloud.nix +++ b/modules/nextcloud.nix @@ -5,37 +5,7 @@ let in with lib; { - # security.acme = { - # acceptTerms = true; - # # defaults = { - # # email = "chris@tfcconnection.org"; - # # # dnsProvider = "cloudflare"; - # # # location of your CLOUDFLARE_DNS_API_TOKEN=[value] - # # # https://www.freedesktop.org/software/systemd/man/latest/systemd.exec.html#EnvironmentFile= - # # environmentFile = "/REPLACE/WITH/YOUR/PATH"; - # # }; - # }; services = { - # caddy = { - # virtualHosts = { - # "${dn}".extraConfig = '' - # encode gzip - # reverse_proxy localhost:8080 - - # redir /.well-known/carddav /remote.php/dav 301 - # redir /.well-known/caldav /remote.php/dav 301 - # header { - # Strict-Transport-Security "max-age=15768000; includeSubDomains; reload;" - # Access-Control-Allow-Origin * - # Referrer-Policy no-referrer-when-downgrade - # } - # redir /.well-known/oidc-configuration /apps/oidc/openid-configuration 301 - # handle_path /whiteboard/* { - # reverse_proxy http://127.0.0.1:3002 - # } - # ''; - # }; - # }; nextcloud = { enable = true; hostName = dn; @@ -71,6 +41,25 @@ with lib; trusted_domains = [ dn ]; trusted_proxies = [ "127.0.0.1" "24.225.22.143" "0.0.0.0" ]; maintenance_window_start = 1; + preview_libreoffice_path = "${pkgs.libreoffice}/bin/libreoffice"; + enabledPreviewProviders = [ + "OC\Preview\BMP" + "OC\Preview\GIF" + "OC\Preview\JPEG" + "OC\Preview\Krita" + "OC\Preview\MarkDown" + "OC\Preview\MP3" + "OC\Preview\OpenDocument" + "OC\Preview\PNG" + "OC\Preview\HEIC" + "OC\Preview\SVG" + "OC\Preview\MSOfficeDoc" + "OC\Preview\MSOffice2007" + "OC\Preview\Movie" + "OC\Preview\Font" + "OC\Preview\TXT" + "OC\Preview\XBitmap" + ]; }; config = { dbtype = "pgsql"; @@ -82,7 +71,10 @@ with lib; package = unstable.nextcloud-notify_push; }; # Suggested by Nextcloud's health check. - phpOptions."opcache.interned_strings_buffer" = "16"; + phpOptions = { + "opcache.interned_strings_buffer" = "32"; + "opcache.buffer" = "256"; + }; }; }; services.nginx.virtualHosts.${dn} = {