diff --git a/configuration.nix b/configuration.nix index 8068e09..ef94124 100755 --- a/configuration.nix +++ b/configuration.nix @@ -349,14 +349,14 @@ in services.postgresql.initialScript = pkgs.writeText "begin-init.sql" '' - CREATE ROLE "ncusr" WITH LOGIN PASSWORD '${config.age.secrets.nextclouddb.path}'; + CREATE ROLE "ncusr" WITH LOGIN PASSWORD '${personalizatoin.nextclouddb}'; CREATE DATABASE "nextclouddb" WITH OWNER "ncusr" TEMPLATE template0 LC_COLLATE = "C" LC_CTYPE = "C"; - CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '${config.age.secrets.matrixdb.path}'; + CREATE ROLE "matrix-synapse" WITH LOGIN PASSWORD '${personalization.matrixdb}'; CREATE DATABASE "matrix-synapse" WITH OWNER "matrix-synapse" TEMPLATE template0 LC_COLLATE = "C" @@ -367,7 +367,7 @@ in services.mysql.initialScript = pkgs.writeText "wordpress-init.sql" '' CREATE DATABASE wordpressdb; - GRANT ALL ON *.* TO 'wpusr'@'localhost' IDENTIFIED BY '${config.age.secrets.wordpressdb.path}'; + GRANT ALL ON *.* TO 'wpusr'@'localhost' IDENTIFIED BY '${personalizatoin.wordpressdb}'; FLUSH PRIVILEGES; '' ; diff --git a/modules/personalization.nix b/modules/personalization.nix index 49887ed..05cac8c 100755 --- a/modules/personalization.nix +++ b/modules/personalization.nix @@ -12,4 +12,13 @@ vaultwarden_url = builtins.readFile /var/lib/domains/vaultwarden; external_ip_secret = builtins.readFile /var/lib/secrets/external_ip; coturn_static_auth_secret = builtins.readFile /var/lib/secrets/turn; +## + +matrixdb = builtins.readFile /var/lib/secrets/matrixdb; +nextclouddb = builtins.readFile /var/lib/secrets/nextclouddb; +wordpressdb = builtins.readFile /var/lib/secrets/wordpressdb; + + + + }