2023-02-04 01:14:39 +01:00
|
|
|
{ pkgs, ... }:
|
|
|
|
{
|
|
|
|
services.nextcloud = {
|
|
|
|
enable = true;
|
|
|
|
config = {
|
|
|
|
dbtype = "pgsql";
|
|
|
|
dbuser = "nextcloud";
|
|
|
|
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
|
|
|
|
dbname = "nextcloud";
|
|
|
|
adminpassFile = "${../secret-data/nextcloud-admin-pass}";
|
|
|
|
adminuser = "root";
|
|
|
|
};
|
|
|
|
package = pkgs.nextcloud25;
|
|
|
|
extraApps = with pkgs.nextcloud25Packages.apps; {
|
2023-02-08 12:48:31 +01:00
|
|
|
inherit bookmarks calendar contacts news tasks;
|
2023-02-04 01:14:39 +01:00
|
|
|
};
|
|
|
|
extraAppsEnable = true;
|
|
|
|
hostName = "wolke.schrottkatze.de";
|
|
|
|
https = true;
|
|
|
|
};
|
|
|
|
|
|
|
|
services.postgresql = {
|
|
|
|
enable = true;
|
|
|
|
ensureDatabases = [ "nextcloud" ];
|
|
|
|
ensureUsers = [
|
2023-02-09 11:26:17 +01:00
|
|
|
{
|
|
|
|
name = "nextcloud";
|
|
|
|
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
|
|
}
|
2023-02-04 01:14:39 +01:00
|
|
|
];
|
|
|
|
};
|
|
|
|
|
|
|
|
# ensure that postgres is running *before* running the setup
|
|
|
|
systemd.services."nextcloud-setup" = {
|
|
|
|
requires = ["postgresql.service"];
|
|
|
|
after = ["postgresql.service"];
|
|
|
|
};
|
|
|
|
}
|