From 866f8b1b908576676ab07f13ae12790176e19df6 Mon Sep 17 00:00:00 2001 From: eyjhb Date: Sat, 24 Aug 2024 22:18:33 +0200 Subject: [PATCH] gerd.nextcloud: moved to postgresql instead of sqlite --- machines/gerd/services/nextcloud.nix | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/machines/gerd/services/nextcloud.nix b/machines/gerd/services/nextcloud.nix index 5c0d230..14184df 100644 --- a/machines/gerd/services/nextcloud.nix +++ b/machines/gerd/services/nextcloud.nix @@ -152,6 +152,11 @@ in { # secrets secretFile = config.age.secrets.nextcloud-secrets.path; + # use postgresql for database + # createLocally will enable postgresql, add database and user + database.createLocally = true; + config.dbtype = "pgsql"; + # settings settings = { # open connect/oidc @@ -193,11 +198,6 @@ in { serviceConfig.RemainAfterExit = true; }; - # ensure that nextcloud can access stateDir - systemd.tmpfiles.rules = [ - "Z ${stateDir} 6770 ${nextcloud_user} ${nextcloud_group} -" - ]; - # setup authelia for nextcloud services.authelia.instances.main.settings.identity_providers.oidc.clients = [{ client_id = AUTHELIA_AUTH_NAME; @@ -217,6 +217,11 @@ in { enableACME = true; }; + # ensure that nextcloud can access stateDir + systemd.tmpfiles.rules = [ + "Z ${stateDir} 6770 ${nextcloud_user} ${nextcloud_group} -" + ]; + age.secrets = { nextcloud-admin-pass.owner = nextcloud_user; nextcloud-secrets.owner = nextcloud_user;