aboutsummaryrefslogtreecommitdiff
path: root/virtual
diff options
context:
space:
mode:
Diffstat (limited to 'virtual')
-rw-r--r--virtual/modules/databases/default.nix11
-rw-r--r--virtual/modules/websites/tools/cloud/nextcloud.nix4
-rw-r--r--virtual/modules/websites/tools/diaspora/diaspora.nix2
-rw-r--r--virtual/modules/websites/tools/mastodon/mastodon.nix6
-rw-r--r--virtual/modules/websites/tools/mediagoblin/mediagoblin.nix4
-rw-r--r--virtual/modules/websites/tools/tools/wallabag.nix8
6 files changed, 15 insertions, 20 deletions
diff --git a/virtual/modules/databases/default.nix b/virtual/modules/databases/default.nix
index 0912830..430d032 100644
--- a/virtual/modules/databases/default.nix
+++ b/virtual/modules/databases/default.nix
@@ -151,23 +151,18 @@ in {
151 } 151 }
152 ]; 152 ];
153 153
154 # Diaspora: 15
155 # Nextcloud: 14
156 # Mastodon: 13
157 # Mediagoblin: 12
158 # wallabag: 0 ?
159 services.redis = rec { 154 services.redis = rec {
160 enable = config.services.myDatabases.redis.enable; 155 enable = config.services.myDatabases.redis.enable;
161 bind = "127.0.0.1"; 156 bind = "127.0.0.1";
162 unixSocket = "/run/redis/redis.sock"; 157 unixSocket = myconfig.env.databases.redis.socket;
163 extraConfig = '' 158 extraConfig = ''
164 unixsocketperm 777 159 unixsocketperm 777
165 maxclients 1024 160 maxclients 1024
166 ''; 161 '';
167 }; 162 };
168 system.activationScripts.redis = '' 163 system.activationScripts.redis = ''
169 mkdir -p /run/redis 164 mkdir -p $(dirname ${myconfig.env.databases.redis.socket})
170 chown redis /run/redis 165 chown redis $(dirname ${myconfig.env.databases.redis.socket})
171 ''; 166 '';
172 }; 167 };
173} 168}
diff --git a/virtual/modules/websites/tools/cloud/nextcloud.nix b/virtual/modules/websites/tools/cloud/nextcloud.nix
index 815254b..1cd7b90 100644
--- a/virtual/modules/websites/tools/cloud/nextcloud.nix
+++ b/virtual/modules/websites/tools/cloud/nextcloud.nix
@@ -138,8 +138,8 @@ let
138 'filelocking.enabled' => true, 138 'filelocking.enabled' => true,
139 'redis' => 139 'redis' =>
140 array ( 140 array (
141 'host' => 'localhost', 141 'host' => '${env.redis.socket}',
142 'port' => 6379, 142 'port' => 0,
143 'dbindex' => ${env.redis.db_index}, 143 'dbindex' => ${env.redis.db_index},
144 ), 144 ),
145 'overwrite.cli.url' => 'https://cloud.immae.eu', 145 'overwrite.cli.url' => 'https://cloud.immae.eu',
diff --git a/virtual/modules/websites/tools/diaspora/diaspora.nix b/virtual/modules/websites/tools/diaspora/diaspora.nix
index be3e426..798ebe6 100644
--- a/virtual/modules/websites/tools/diaspora/diaspora.nix
+++ b/virtual/modules/websites/tools/diaspora/diaspora.nix
@@ -28,7 +28,7 @@ let
28 environment: 28 environment:
29 url: "https://diaspora.immae.eu/" 29 url: "https://diaspora.immae.eu/"
30 certificate_authorities: '${cacert}/etc/ssl/certs/ca-bundle.crt' 30 certificate_authorities: '${cacert}/etc/ssl/certs/ca-bundle.crt'
31 redis: 'redis://localhost:6379/15' 31 redis: '${env.redis_url}'
32 sidekiq: 32 sidekiq:
33 s3: 33 s3:
34 assets: 34 assets:
diff --git a/virtual/modules/websites/tools/mastodon/mastodon.nix b/virtual/modules/websites/tools/mastodon/mastodon.nix
index cb8bfc8..e6b396b 100644
--- a/virtual/modules/websites/tools/mastodon/mastodon.nix
+++ b/virtual/modules/websites/tools/mastodon/mastodon.nix
@@ -64,9 +64,9 @@ let
64 buildInputs = [ yarnModules gems ]; 64 buildInputs = [ yarnModules gems ];
65 }); 65 });
66 config = writeText "mastodon_environment" '' 66 config = writeText "mastodon_environment" ''
67 REDIS_HOST=localhost 67 REDIS_HOST=${env.redis.host}
68 REDIS_PORT=6379 68 REDIS_PORT=${env.redis.port}
69 REDIS_DB=13 69 REDIS_DB=${env.redis.db}
70 DB_HOST=/run/postgresql 70 DB_HOST=/run/postgresql
71 DB_USER=mastodon 71 DB_USER=mastodon
72 DB_NAME=mastodon 72 DB_NAME=mastodon
diff --git a/virtual/modules/websites/tools/mediagoblin/mediagoblin.nix b/virtual/modules/websites/tools/mediagoblin/mediagoblin.nix
index 54470a4..cad6225 100644
--- a/virtual/modules/websites/tools/mediagoblin/mediagoblin.nix
+++ b/virtual/modules/websites/tools/mediagoblin/mediagoblin.nix
@@ -225,8 +225,8 @@ in
225 base_url = /mgoblin_media/ 225 base_url = /mgoblin_media/
226 226
227 [celery] 227 [celery]
228 CELERY_RESULT_DBURI = redis+socket:///run/redis/redis.sock?virtual_host=12 228 CELERY_RESULT_DBURI = ${env.redis_url}
229 BROKER_URL = redis+socket:///run/redis/redis.sock?virtual_host=12 229 BROKER_URL = ${env.redis_url}
230 CELERYD_CONCURRENCY = 1 230 CELERYD_CONCURRENCY = 1
231 231
232 [plugins] 232 [plugins]
diff --git a/virtual/modules/websites/tools/tools/wallabag.nix b/virtual/modules/websites/tools/tools/wallabag.nix
index d6eb95a..e708e8c 100644
--- a/virtual/modules/websites/tools/tools/wallabag.nix
+++ b/virtual/modules/websites/tools/tools/wallabag.nix
@@ -34,10 +34,10 @@ let
34 rabbitmq_user: guest 34 rabbitmq_user: guest
35 rabbitmq_password: guest 35 rabbitmq_password: guest
36 rabbitmq_prefetch_count: 10 36 rabbitmq_prefetch_count: 10
37 redis_scheme: tcp 37 redis_scheme: unix
38 redis_host: localhost 38 redis_host: null
39 redis_port: 6379 39 redis_port: null
40 redis_path: null 40 redis_path: ${env.redis.socket}
41 redis_password: null 41 redis_password: null
42 sites_credentials: { } 42 sites_credentials: { }
43 ldap_enabled: true 43 ldap_enabled: true