diff --git a/configuration.nix b/configuration.nix index 9805336..4b7a939 100644 --- a/configuration.nix +++ b/configuration.nix @@ -22,6 +22,10 @@ let upload_max_filesize = 2048M opcache.interned_strings_buffer = 32 apc.enable_cli=1 + redis.session.locking_enabled=1 + redis.session.lock_retries=-1 + redis.session.lock_wait_time=10000 + ''; }; in diff --git a/for_new_sovran_pros/sp.sh b/for_new_sovran_pros/sp.sh index a32345e..7675494 100644 --- a/for_new_sovran_pros/sp.sh +++ b/for_new_sovran_pros/sp.sh @@ -69,7 +69,17 @@ cat > /var/lib/nextcloudaddition/nextcloudaddition <<- "EOF" ), 'default_locale' => 'en_US', 'default_phone_region' => 'US', - 'memcache.local' => '\\OC\\Memcache\\APCu', + 'filelocking.enabled' => true, + 'memcache.locking' => '\OC\Memcache\Redis', + 'memcache.distributed' => '\OC\Memcache\Redis', + 'memcache.local' =>'\OC\Memcache\Redis' , + 'redis' => + array ( + 'host' => '/run/redis-roffice/redis.sock', + 'port' => 0, + 'timeout' => 0.0, + ), + EOF @@ -105,6 +115,20 @@ EOF # +mkdir /var/lib/internal_ip + +cat > /var/lib/internal_ip/internal_ip.sh <<- "EOF" + +#!/usr/bin/env bash + +sudo echo -n $(ip route get 1.2.3.4 | awk '{print $7}') > /var/lib/secrets/internal_ip + +exit 0 + + +EOF + +# mkdir /var/lib/agenix-secrets/ cat > /var/lib/agenix-secrets/secrets.nix <<- "EOF" @@ -144,6 +168,7 @@ touch /var/lib/secrets/matrix_reg_secret touch /var/lib/secrets/main touch /var/lib/secrets/vaultwarden/vaultwarden.env touch /var/lib/secrets/external_ip +touch /var/lib/secrets/internal_ip echo -n $(pwgen -s 17 -1) > /var/lib/secrets/nextclouddb echo -n $(pwgen -s 17 -1) > /var/lib/secrets/wordpressdb @@ -196,6 +221,8 @@ chown root:root /var/lib/secrets/main -R chown root:root /var/lib/secrets/external_ip -R +chown root:root /var/lib/secrets/internal_ip -R + chown matrix-synapse:matrix-synapse /var/lib/secrets/matrix_reg_secret -R chown matrix-synapse:matrix-synapse /var/lib/secrets/matrixdb -R