nix-configs/hosts/schrottserver/nextcloud.nix

39 lines
991 B
Nix
Raw Normal View History

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";
2023-08-24 16:55:49 +02:00
adminpassFile = "${../../secret-data/nextcloud-admin-pass}";
2023-02-04 01:14:39 +01:00
adminuser = "root";
};
package = pkgs.nextcloud25;
extraApps = with pkgs.nextcloud25Packages.apps; {
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"];
};
}