2022-04-07 23:02:58 +02:00
|
|
|
{ pkgs, config, lib, ... }:
|
2021-11-13 01:48:32 +01:00
|
|
|
{
|
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
|
|
|
hostName = "nuage.beta.rz.ens.wtf";
|
|
|
|
https = true;
|
|
|
|
|
2022-06-26 23:48:43 +02:00
|
|
|
package = pkgs.nextcloud23;
|
2022-04-07 23:02:58 +02:00
|
|
|
|
2021-11-13 01:48:32 +01:00
|
|
|
config = {
|
|
|
|
overwriteProtocol = "https";
|
|
|
|
|
|
|
|
dbtype = "pgsql";
|
|
|
|
dbhost = "/run/postgresql";
|
|
|
|
|
2021-11-15 00:11:19 +01:00
|
|
|
dbpassFile = config.age.secrets.nextcloudDatabasePassword.path;
|
|
|
|
adminpassFile = config.age.secrets.nextcloudAdminPassword.path;
|
2021-11-13 01:48:32 +01:00
|
|
|
|
|
|
|
defaultPhoneRegion = "FR";
|
|
|
|
};
|
2022-03-06 20:22:03 +01:00
|
|
|
|
|
|
|
poolSettings = {
|
|
|
|
pm = "dynamic";
|
|
|
|
"pm.max_children" = 100;
|
|
|
|
"pm.start_servers" = 16;
|
|
|
|
"pm.min_spare_servers" = 8;
|
|
|
|
"pm.max_spare_servers" = 16;
|
|
|
|
"pm.status_path" = "/status";
|
|
|
|
};
|
2021-11-13 01:48:32 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
services.nginx = {
|
|
|
|
virtualHosts = {
|
|
|
|
"nuage.beta.rz.ens.wtf" = {
|
|
|
|
forceSSL = true;
|
|
|
|
enableACME = true;
|
2022-03-06 20:22:03 +01:00
|
|
|
http2 = true;
|
2021-11-13 01:48:32 +01:00
|
|
|
};
|
|
|
|
};
|
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
|
|
|
|
ensureDatabases = [ "nextcloud" ];
|
|
|
|
ensureUsers = [
|
|
|
|
{ name = "nextcloud";
|
|
|
|
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
|
|
}
|
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
systemd.services."nextcloud-setup" = {
|
|
|
|
requires = [ "postgresql.service" ];
|
|
|
|
after = [ "postgresql.service" ];
|
|
|
|
};
|
|
|
|
|
|
|
|
networking.firewall.allowedTCPPorts = [ 80 443 ];
|
|
|
|
}
|