diff --git a/hosts/VEGAS/services/nextcloud/default.nix b/hosts/VEGAS/services/nextcloud/default.nix index 013fbfe..1d0f5a7 100644 --- a/hosts/VEGAS/services/nextcloud/default.nix +++ b/hosts/VEGAS/services/nextcloud/default.nix @@ -1,6 +1,8 @@ -{ config, lib, pkgs, tools, ... }: +{ cluster, config, lib, pkgs, tools, ... }: let cfg = config.services.nextcloud.config; + + patroni = cluster.config.links.patroni-pg-access; in { age.secrets = { @@ -35,16 +37,16 @@ in }; config = { - dbhost = "/run/postgresql"; + dbhost = patroni.tuple; dbtype = "pgsql"; dbname = "storage"; dbuser = "storage"; - dbpassFile = config.age.secrets.nextcloud-adminpass.path; + dbpassFile = config.age.secrets.nextcloud-dbpass.path; overwriteProtocol = "https"; adminuser = "sa"; - adminpassFile = config.age.secrets.nextcloud-dbpass.path; + adminpassFile = config.age.secrets.nextcloud-adminpass.path; }; }; services.postgresql.authentication = "local ${cfg.dbname} ${cfg.dbuser} md5"; diff --git a/secrets/nextcloud-adminpass.age b/secrets/nextcloud-adminpass.age index c9a80c6..4f7e983 100644 Binary files a/secrets/nextcloud-adminpass.age and b/secrets/nextcloud-adminpass.age differ diff --git a/secrets/nextcloud-dbpass.age b/secrets/nextcloud-dbpass.age index ec5dd01..4888934 100644 Binary files a/secrets/nextcloud-dbpass.age and b/secrets/nextcloud-dbpass.age differ