]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/tools/mastodon/mastodon.nix
Put some database variables to environment
[perso/Immae/Config/Nix.git] / virtual / modules / websites / tools / mastodon / mastodon.nix
index cb8bfc8b4b3d2a45363e361c2f0668f159f32612..770aa2cb5b584cf3157ae92a7116206a4a032c85 100644 (file)
@@ -64,14 +64,14 @@ let
     buildInputs = [ yarnModules gems ];
   });
   config = writeText "mastodon_environment" ''
-    REDIS_HOST=localhost
-    REDIS_PORT=6379
-    REDIS_DB=13
-    DB_HOST=/run/postgresql
-    DB_USER=mastodon
-    DB_NAME=mastodon
+    REDIS_HOST=${env.redis.host}
+    REDIS_PORT=${env.redis.port}
+    REDIS_DB=${env.redis.db}
+    DB_HOST=${env.postgresql.socket}
+    DB_USER=${env.postgresql.user}
+    DB_NAME=${env.postgresql.database}
     DB_PASS=${env.postgresql.password}
-    DB_PORT=5432
+    DB_PORT=${env.postgresql.port}
 
     LOCAL_DOMAIN=mastodon.immae.eu
     LOCAL_HTTPS=true