updated synape personalizatoin configuration

This commit is contained in:
naturallaw77 2024-12-16 20:39:49 -08:00
parent 7481b51074
commit 4de15a4d08
3 changed files with 7 additions and 19 deletions

View File

@ -294,18 +294,6 @@ in
###### AGENIX #######
age.identityPaths = [ "/root/.ssh/agenix/agenix-secret-keys" ];
age.secrets.matrix_reg_secret = {
file = /var/lib/agenix-secrets/matrix_reg_secret.age;
mode = "770";
owner = "matrix-synapse";
group = "matrix-synapse";
};
###### CREATE DATABASE (WORDPRESS, MATRIX_SYNAPSE, AND NEXTCLOUD) ####### ###### CREATE DATABASE (WORDPRESS, MATRIX_SYNAPSE, AND NEXTCLOUD) #######
services.postgresql = { services.postgresql = {
enable = true; enable = true;
@ -328,14 +316,14 @@ in
services.postgresql.initialScript = pkgs.writeText "begin-init.sql" '' services.postgresql.initialScript = pkgs.writeText "begin-init.sql" ''
CREATE ROLE "ncusr" WITH LOGIN PASSWORD '${personalization.age.secrets.nextclouddb.file}'; CREATE ROLE "ncusr" WITH LOGIN PASSWORD '${personalization.nextclouddb}';
CREATE DATABASE "nextclouddb" WITH OWNER "ncusr" CREATE DATABASE "nextclouddb" WITH OWNER "ncusr"
TEMPLATE template0 TEMPLATE template0
LC_COLLATE = "C" LC_COLLATE = "C"
LC_CTYPE = "C"; LC_CTYPE = "C";
CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '${personalization.age.secrets.matrixdb.file}'; CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '${personalization.matrixdb}';
CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse" CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse"
TEMPLATE template0 TEMPLATE template0
LC_COLLATE = "C" LC_COLLATE = "C"
@ -346,7 +334,7 @@ in
services.mysql.initialScript = pkgs.writeText "wordpress-init.sql" '' services.mysql.initialScript = pkgs.writeText "wordpress-init.sql" ''
CREATE DATABASE wordpressdb; CREATE DATABASE wordpressdb;
GRANT ALL ON *.* TO 'wpusr'@'localhost' IDENTIFIED BY '${personalization.age.secrets.wordpressdb.file}'; GRANT ALL ON *.* TO 'wpusr'@'localhost' IDENTIFIED BY '${personalization.wordpressdb}';
FLUSH PRIVILEGES; FLUSH PRIVILEGES;
'' ''
; ;

View File

@ -14,9 +14,9 @@ coturn_static_auth_secret = builtins.readFile /var/lib/secrets/turn;
## ##
age.secrets.matrixdb.file = /var/lib/agenix-secrets/matrixdb.age; matrixdb = builtins.readFile /var/lib/secrets/matrixdb;
age.secrets.nextclouddb.file = /var/lib/agenix-secrets/nextclouddb.age; nextclouddb = builtins.readFile /var/lib/secrets/nextclouddb;
age.secrets.wordpressdb.file = /var/lib/agenix-secrets/wordpressdb.age; wordpressdb = builtins.readFile /var/lib/secrets/wordpressdb;
} }

View File

@ -50,7 +50,7 @@ in
]; ];
presence.enabled = true; presence.enabled = true;
enable_registration = false; enable_registration = false;
registration_shared_secret = config.age.secrets.matrix_reg_secret.path; registration_shared_secret = ${services.matrix-synapse.extraConfigFiles = /var/lib/secrets/matrix_reg_secret};
listeners = [ listeners = [
{ {
port = 8008; port = 8008;