nixos-config/modules/services/server/nextcloud.nix
2023-04-23 18:52:34 +02:00

51 lines
1.4 KiB
Nix

{ config, pkgs, ... }:
{
services.nextcloud = {
enable = true;
hostName = "cloud.kabtop.de";
https = true;
package = pkgs.nextcloud26;
enableBrokenCiphersForSSE = false;
config = {
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "localhost";
dbname = "nextclouddb";
adminuser = "kabbone";
adminpassFile = config.age.secrets."services/nextcloud/adminpassFile".path;
dbpassFile = config.age.secrets."services/nextcloud/dbpassFile".path;
overwriteProtocol = "https";
defaultPhoneRegion = "DE";
};
phpOptions = {
"opcache.interned_strings_buffer" = "16";
};
#autoUpdateApps.enable = true;
};
services.nginx = {
enable = true;
virtualHosts = {
"${config.services.nextcloud.hostName}" = {
enableACME = true;
forceSSL = true;
};
};
};
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";
};
systemd.services."nextcloud-setup" = {
requires = ["postgresql.service"];
after = ["postgresql.service"];
};
}