-
Notifications
You must be signed in to change notification settings - Fork 0
/
nextcloud.nix
40 lines (36 loc) · 990 Bytes
/
nextcloud.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# Include via nextcloud-container.nix to run NextCloud in a container
{ config, lib, pkgs, ... }: {
services.nextcloud = {
enable = true;
package = pkgs.nextcloud29;
hostName = "nextcloud.mrph.org";
config = {
extraTrustedDomains = [
"m2.mrph.org.beta.tailscale.net"
# "m2"
];
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
adminpassFile = "/srv/secrets/adminpass";
adminuser = "root";
};
};
services.postgresql = {
enable = true;
ensureDatabases = [ "nextcloud" ];
ensureUsers = [
{
name = "nextcloud";
ensureDBOwnership = true;
}
];
};
# ensure that postgres is running *before* running the setup
systemd.services."nextcloud-setup" = {
requires = [ "postgresql.service" ];
after = [ "postgresql.service" ];
};
system.stateVersion = "22.11";
}