tlaternet-server/configuration/services/nextcloud.nix

36 lines
845 B
Nix
Raw Normal View History

{
pkgs,
config,
...
}: let
inherit (pkgs) fetchNextcloudApp;
nextcloud = pkgs.nextcloud23;
in {
services.nextcloud = {
package = nextcloud;
enable = true;
hostName = "nextcloud.${config.services.nginx.domain}";
maxUploadSize = "2G";
https = true;
2021-04-12 01:42:46 +01:00
config = {
overwriteProtocol = "https";
2021-04-12 01:42:46 +01:00
dbtype = "pgsql";
dbhost = "/run/postgresql";
2021-04-12 01:42:46 +01:00
adminuser = "tlater";
adminpassFile = config.sops.secrets."nextcloud/tlater".path;
2021-04-12 01:42:46 +01:00
defaultPhoneRegion = "AT";
2021-04-12 01:42:46 +01:00
};
# TODO(tlater): Add redis config. This will be much easier
# starting with 22.11, since this will add an `extraOptions` where
# the necessary redis config can go.
2021-04-12 01:42:46 +01:00
};
# Ensure that this service doesn't start before postgres is ready
systemd.services.nextcloud-setup.after = ["postgresql.service"];
2021-04-12 01:42:46 +01:00
}