mirror of
https://forge.katzen.cafe/schrottkatze/nix-configs.git
synced 2024-11-06 07:36:23 +01:00
38 lines
1 KiB
Nix
38 lines
1 KiB
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 deck keeweb mail news notes onlyoffice polls tasks twofactor_webauthn;
|
||
|
};
|
||
|
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"];
|
||
|
};
|
||
|
}
|