nextcloud docker working

This commit is contained in:
Elias Gasparis 2025-06-01 22:39:20 +08:00
parent bc78646407
commit 07ec8df992
8 changed files with 231 additions and 37 deletions

View file

@ -1,41 +1,14 @@
{ config, pkgs, ... }:
{
services.nextcloud = {
enable = true;
configureRedis = true;
package = pkgs.nextcloud30;
hostName = "nextcloud.knossos";
datadir = "/home/elias/nextcloud/";
settings = {
overwriteprotocol = "https";
trusted_proxies = [ "localhost" "127.0.0.1" "100.82.24.89" ];
#trusted_domains = [ "knossos.zebra-rudd.ts.net" ];
};
config = {
dbtype = "pgsql";
dbuser = "nextcloud";
dbhost = "/run/postgresql"; # nextcloud will add /.s.PGSQL.5432 by itself
dbname = "nextcloud";
adminpassFile = "/var/lib/secrets/nextcloud-admin-pass";
adminuser = "admin";
};
enable = true;
package = pkgs.nextcloud31;
hostName = "nextcloud.knossos";
config.adminpassFile = "/var/lib/nextcloud-admin-pass";
config.dbtype = "sqlite";
};
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"];
};
services.nginx.virtualHosts."nextcloud.knossos".listen = [ { addr = "127.0.0.1"; port = 8009; } ];