2022-12-11 18:35:42 +01:00
|
|
|
|
2023-01-03 16:57:39 +01:00
|
|
|
{ config, pkgs, ... }:
|
2022-12-11 18:35:42 +01:00
|
|
|
{
|
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
2022-12-31 19:02:57 +01:00
|
|
|
hostName = "cloud2.kabtop.de";
|
2022-12-11 18:35:42 +01:00
|
|
|
https = true;
|
2022-12-31 19:02:57 +01:00
|
|
|
package = pkgs.nextcloud25;
|
2023-01-03 16:57:39 +01:00
|
|
|
enableBrokenCiphersForSSE = false;
|
2022-12-11 18:35:42 +01:00
|
|
|
config = {
|
|
|
|
dbtype = "pgsql";
|
|
|
|
dbuser = "nextcloud";
|
|
|
|
dbhost = "localhost";
|
|
|
|
dbname = "nextclouddb";
|
|
|
|
adminuser = "kabbone";
|
2022-12-27 09:25:23 +01:00
|
|
|
adminpassFile = config.age.secrets."services/nextcloud/adminpassFile".path;
|
|
|
|
dbpassFile = config.age.secrets."services/nextcloud/dbpassFile".path;
|
2022-12-31 19:02:57 +01:00
|
|
|
overwriteProtocol = "https";
|
|
|
|
defaultPhoneRegion = "DE";
|
2022-12-11 18:35:42 +01:00
|
|
|
};
|
2023-01-03 16:14:25 +01:00
|
|
|
phpOptions = {
|
|
|
|
"opcache.interned_strings_buffer" = "16";
|
|
|
|
};
|
2022-12-31 19:02:57 +01:00
|
|
|
#autoUpdateApps.enable = true;
|
2022-12-11 18:35:42 +01:00
|
|
|
};
|
|
|
|
|
2023-01-03 16:57:39 +01:00
|
|
|
services.nginx = {
|
|
|
|
enable = true;
|
|
|
|
virtualHosts = {
|
|
|
|
"${config.services.nextcloud.hostName}" = {
|
|
|
|
enableACME = true;
|
|
|
|
forceSSL = true;
|
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
2022-12-27 09:25:23 +01:00
|
|
|
age.secrets."services/nextcloud/dbpassFile" = {
|
|
|
|
file = ../../../secrets/services/nextcloud/dbpassFile.age;
|
|
|
|
owner = "nextcloud";
|
|
|
|
};
|
|
|
|
age.secrets."services/nextcloud/adminpassFile" = {
|
|
|
|
file = ../../../secrets/services/nextcloud/adminpassFile.age;
|
|
|
|
owner = "nextcloud";
|
|
|
|
};
|
|
|
|
|
2022-12-11 18:35:42 +01:00
|
|
|
systemd.services."nextcloud-setup" = {
|
|
|
|
requires = ["postgresql.service"];
|
|
|
|
after = ["postgresql.service"];
|
|
|
|
};
|
|
|
|
}
|