2019-05-09 18:28:40 +02:00
|
|
|
{ config, lib, ... }:
|
2019-02-26 13:44:40 +01:00
|
|
|
|
2019-03-20 02:57:59 +01:00
|
|
|
with lib;
|
|
|
|
|
|
|
|
mkIf (elem "nextcloud" config.machine.services) {
|
2019-02-26 13:44:40 +01:00
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
|
|
|
home = "/var/lib/nextcloud";
|
2019-03-23 02:50:48 +01:00
|
|
|
hostName = "storage.${config.machine.domain}";
|
2019-02-26 13:44:40 +01:00
|
|
|
https = true;
|
|
|
|
maxUploadSize = "1024M";
|
|
|
|
config = {
|
|
|
|
adminuser = "derped";
|
2019-08-28 15:56:19 +02:00
|
|
|
adminpassFile = "${config.machine.secretPath}/nextcloud_admin";
|
2019-02-26 13:44:40 +01:00
|
|
|
dbtype = "mysql";
|
|
|
|
dbhost = "localhost";
|
|
|
|
dbport = "3306";
|
|
|
|
dbuser = "nextcloud";
|
2019-08-28 15:56:19 +02:00
|
|
|
dbpassFile = "${config.machine.secretPath}/nextcloud_db";
|
2019-02-26 13:44:40 +01:00
|
|
|
dbname = "nextcloud";
|
|
|
|
dbtableprefix = "oc_";
|
|
|
|
};
|
|
|
|
caching = {
|
|
|
|
apcu = true;
|
|
|
|
memcached = true;
|
|
|
|
redis = false;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|