{ config, lib, ... }: with lib; mkIf (elem "nextcloud" config.machine.services) { services.nextcloud = { enable = true; home = "/var/lib/nextcloud"; hostName = "storage.${config.machine.domain}"; https = true; maxUploadSize = "1024M"; config = { adminuser = "derped"; adminpassFile = "${config.machine.secretPath}/nextcloud_admin"; dbtype = "mysql"; dbhost = "localhost"; dbport = "3306"; dbuser = "nextcloud"; dbpassFile = "${config.machine.secretPath}/nextcloud_db"; dbname = "nextcloud"; dbtableprefix = "oc_"; }; caching = { apcu = true; memcached = true; redis = false; }; }; }