2023-08-03 15:51:21 +02:00
|
|
|
{ pkgs, config, ... }:
|
|
|
|
{
|
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
2024-12-01 00:35:31 +01:00
|
|
|
package = pkgs.nextcloud30;
|
2023-08-03 15:51:21 +02:00
|
|
|
hostName = "cloud.nekover.se";
|
|
|
|
https = true;
|
|
|
|
config = {
|
|
|
|
dbtype = "pgsql";
|
|
|
|
adminpassFile = "/secrets/nextcloud-adminpass.secret";
|
|
|
|
};
|
|
|
|
database.createLocally = true;
|
|
|
|
configureRedis = true;
|
|
|
|
extraAppsEnable = true;
|
|
|
|
extraApps = with config.services.nextcloud.package.packages.apps; {
|
2024-01-19 12:16:03 +01:00
|
|
|
inherit bookmarks contacts calendar tasks twofactor_webauthn user_oidc;
|
2023-08-03 15:51:21 +02:00
|
|
|
};
|
|
|
|
maxUploadSize = "16G";
|
2024-07-04 17:21:02 +02:00
|
|
|
settings = {
|
2023-08-04 03:32:06 +02:00
|
|
|
mail_smtpmode = "smtp";
|
|
|
|
mail_sendmailmode = "smtp";
|
|
|
|
mail_smtpsecure = "ssl";
|
|
|
|
mail_from_address = "cloud";
|
|
|
|
mail_domain = "nekover.se";
|
|
|
|
mail_smtpauthtype = "LOGIN";
|
|
|
|
mail_smtpauth = 1;
|
2023-09-19 17:56:36 +02:00
|
|
|
mail_smtphost = "mail-1.grzb.de";
|
2023-08-04 03:32:06 +02:00
|
|
|
mail_smtpport = 465;
|
2023-09-19 17:56:36 +02:00
|
|
|
mail_smtpname = "cloud@nekover.se";
|
2024-07-04 17:21:02 +02:00
|
|
|
default_phone_region = "DE";
|
2023-08-04 03:32:06 +02:00
|
|
|
};
|
2023-08-05 20:36:14 +02:00
|
|
|
# Only contains mail_smtppassword
|
2023-08-04 03:32:06 +02:00
|
|
|
secretFile = "/secrets/nextcloud-secretfile.secret";
|
2023-08-05 20:36:14 +02:00
|
|
|
phpOptions = {
|
|
|
|
# The amount of memory for interned strings in Mbytes
|
|
|
|
"opcache.interned_strings_buffer" = "64";
|
|
|
|
};
|
2023-08-03 15:51:21 +02:00
|
|
|
};
|
|
|
|
|
2023-08-04 03:32:06 +02:00
|
|
|
services.nginx = {
|
|
|
|
virtualHosts.${config.services.nextcloud.hostName} = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
|
|
|
extraConfig = ''
|
2023-09-03 17:43:41 +02:00
|
|
|
listen 0.0.0.0:8443 http2 ssl proxy_protocol;
|
|
|
|
|
2023-08-04 03:32:06 +02:00
|
|
|
set_real_ip_from 10.202.41.100;
|
|
|
|
real_ip_header proxy_protocol;
|
|
|
|
'';
|
|
|
|
};
|
2023-08-03 15:51:21 +02:00
|
|
|
};
|
|
|
|
}
|