VEGAS/nextcloud: rekey secrets and move to Patroni database

This commit is contained in:
Max Headroom 2022-08-07 23:38:46 +02:00
parent df62cbfe93
commit 0614be7afb
3 changed files with 6 additions and 4 deletions

View file

@ -1,6 +1,8 @@
{ config, lib, pkgs, tools, ... }: { cluster, config, lib, pkgs, tools, ... }:
let let
cfg = config.services.nextcloud.config; cfg = config.services.nextcloud.config;
patroni = cluster.config.links.patroni-pg-access;
in in
{ {
age.secrets = { age.secrets = {
@ -35,16 +37,16 @@ in
}; };
config = { config = {
dbhost = "/run/postgresql"; dbhost = patroni.tuple;
dbtype = "pgsql"; dbtype = "pgsql";
dbname = "storage"; dbname = "storage";
dbuser = "storage"; dbuser = "storage";
dbpassFile = config.age.secrets.nextcloud-adminpass.path; dbpassFile = config.age.secrets.nextcloud-dbpass.path;
overwriteProtocol = "https"; overwriteProtocol = "https";
adminuser = "sa"; 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"; services.postgresql.authentication = "local ${cfg.dbname} ${cfg.dbuser} md5";

Binary file not shown.

Binary file not shown.