mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-28 23:48:44 +01:00
39 lines
991 B
Nix
39 lines
991 B
Nix
{ 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; {
|
|
inherit bookmarks calendar contacts news tasks;
|
|
};
|
|
extraAppsEnable = true;
|
|
hostName = "wolke.schrottkatze.de";
|
|
https = true;
|
|
};
|
|
|
|
services.postgresql = {
|
|
enable = true;
|
|
ensureDatabases = [ "nextcloud" ];
|
|
ensureUsers = [
|
|
{
|
|
name = "nextcloud";
|
|
ensurePermissions."DATABASE nextcloud" = "ALL PRIVILEGES";
|
|
}
|
|
];
|
|
};
|
|
|
|
# ensure that postgres is running *before* running the setup
|
|
systemd.services."nextcloud-setup" = {
|
|
requires = ["postgresql.service"];
|
|
after = ["postgresql.service"];
|
|
};
|
|
}
|