diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-24 19:53:39 +0100 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2019-01-24 19:53:39 +0100 |
commit | 6f4574e7b57043340a2a520c4bbeb17dde72e0ea (patch) | |
tree | 1a0a563f1a8eb9cf5844d50f61028638f982d9cb | |
parent | b0781dbc85da7bba5a3a9209ca4d3b3900eea7b5 (diff) | |
download | Nix-6f4574e7b57043340a2a520c4bbeb17dde72e0ea.tar.gz Nix-6f4574e7b57043340a2a520c4bbeb17dde72e0ea.tar.zst Nix-6f4574e7b57043340a2a520c4bbeb17dde72e0ea.zip |
Put some database variables to environment
-rw-r--r-- | virtual/modules/databases/default.nix | 2 | ||||
-rw-r--r-- | virtual/modules/websites/tools/cloud/nextcloud.nix | 4 | ||||
-rw-r--r-- | virtual/modules/websites/tools/mastodon/mastodon.nix | 8 | ||||
-rw-r--r-- | virtual/modules/websites/tools/tools/wallabag.nix | 8 |
4 files changed, 11 insertions, 11 deletions
diff --git a/virtual/modules/databases/default.nix b/virtual/modules/databases/default.nix index 430d032..304ad89 100644 --- a/virtual/modules/databases/default.nix +++ b/virtual/modules/databases/default.nix | |||
@@ -73,7 +73,7 @@ in { | |||
73 | }; | 73 | }; |
74 | 74 | ||
75 | system.activationScripts.postgresql = '' | 75 | system.activationScripts.postgresql = '' |
76 | install -m 0755 -o postgres -g postgres -d /run/postgresql | 76 | install -m 0755 -o postgres -g postgres -d ${myconfig.env.databases.postgresql.socket} |
77 | ''; | 77 | ''; |
78 | 78 | ||
79 | services.postgresql = rec { | 79 | services.postgresql = rec { |
diff --git a/virtual/modules/websites/tools/cloud/nextcloud.nix b/virtual/modules/websites/tools/cloud/nextcloud.nix index 1cd7b90..3c6bfc9 100644 --- a/virtual/modules/websites/tools/cloud/nextcloud.nix +++ b/virtual/modules/websites/tools/cloud/nextcloud.nix | |||
@@ -105,8 +105,8 @@ let | |||
105 | 'debug' => false, | 105 | 'debug' => false, |
106 | 'dbtype' => 'pgsql', | 106 | 'dbtype' => 'pgsql', |
107 | 'version' => '15.0.0.10', | 107 | 'version' => '15.0.0.10', |
108 | 'dbname' => 'webapps', | 108 | 'dbname' => '${env.postgresql.database}', |
109 | 'dbhost' => '/run/postgresql', | 109 | 'dbhost' => '${env.postgresql.socket}', |
110 | 'dbtableprefix' => 'oc_', | 110 | 'dbtableprefix' => 'oc_', |
111 | 'dbuser' => '${env.postgresql.user}', | 111 | 'dbuser' => '${env.postgresql.user}', |
112 | 'dbpassword' => '${env.postgresql.password}', | 112 | 'dbpassword' => '${env.postgresql.password}', |
diff --git a/virtual/modules/websites/tools/mastodon/mastodon.nix b/virtual/modules/websites/tools/mastodon/mastodon.nix index e6b396b..770aa2c 100644 --- a/virtual/modules/websites/tools/mastodon/mastodon.nix +++ b/virtual/modules/websites/tools/mastodon/mastodon.nix | |||
@@ -67,11 +67,11 @@ let | |||
67 | REDIS_HOST=${env.redis.host} | 67 | REDIS_HOST=${env.redis.host} |
68 | REDIS_PORT=${env.redis.port} | 68 | REDIS_PORT=${env.redis.port} |
69 | REDIS_DB=${env.redis.db} | 69 | REDIS_DB=${env.redis.db} |
70 | DB_HOST=/run/postgresql | 70 | DB_HOST=${env.postgresql.socket} |
71 | DB_USER=mastodon | 71 | DB_USER=${env.postgresql.user} |
72 | DB_NAME=mastodon | 72 | DB_NAME=${env.postgresql.database} |
73 | DB_PASS=${env.postgresql.password} | 73 | DB_PASS=${env.postgresql.password} |
74 | DB_PORT=5432 | 74 | DB_PORT=${env.postgresql.port} |
75 | 75 | ||
76 | LOCAL_DOMAIN=mastodon.immae.eu | 76 | LOCAL_DOMAIN=mastodon.immae.eu |
77 | LOCAL_HTTPS=true | 77 | LOCAL_HTTPS=true |
diff --git a/virtual/modules/websites/tools/tools/wallabag.nix b/virtual/modules/websites/tools/tools/wallabag.nix index e708e8c..4bda808 100644 --- a/virtual/modules/websites/tools/tools/wallabag.nix +++ b/virtual/modules/websites/tools/tools/wallabag.nix | |||
@@ -7,10 +7,10 @@ let | |||
7 | parameters: | 7 | parameters: |
8 | database_driver: pdo_pgsql | 8 | database_driver: pdo_pgsql |
9 | database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver | 9 | database_driver_class: Wallabag\CoreBundle\Doctrine\DBAL\Driver\CustomPostgreSQLDriver |
10 | database_host: db-1.immae.eu | 10 | database_host: ${env.postgresql.socket} |
11 | database_port: null | 11 | database_port: ${env.postgresql.port} |
12 | database_name: webapps | 12 | database_name: ${env.postgresql.database} |
13 | database_user: wallabag | 13 | database_user: ${env.postgresql.user} |
14 | database_password: ${env.postgresql.password} | 14 | database_password: ${env.postgresql.password} |
15 | database_path: null | 15 | database_path: null |
16 | database_table_prefix: wallabag_ | 16 | database_table_prefix: wallabag_ |