update sp.sh and configuraiton.nix

This commit is contained in:
naturallaw77 2023-09-05 08:27:04 -07:00
parent aa985b7be7
commit b8c9717f52
2 changed files with 32 additions and 1 deletions

View File

@ -22,6 +22,10 @@ let
upload_max_filesize = 2048M upload_max_filesize = 2048M
opcache.interned_strings_buffer = 32 opcache.interned_strings_buffer = 32
apc.enable_cli=1 apc.enable_cli=1
redis.session.locking_enabled=1
redis.session.lock_retries=-1
redis.session.lock_wait_time=10000
''; '';
}; };
in in

View File

@ -69,7 +69,17 @@ cat > /var/lib/nextcloudaddition/nextcloudaddition <<- "EOF"
), ),
'default_locale' => 'en_US', 'default_locale' => 'en_US',
'default_phone_region' => '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 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/ mkdir /var/lib/agenix-secrets/
cat > /var/lib/agenix-secrets/secrets.nix <<- "EOF" 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/main
touch /var/lib/secrets/vaultwarden/vaultwarden.env touch /var/lib/secrets/vaultwarden/vaultwarden.env
touch /var/lib/secrets/external_ip 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/nextclouddb
echo -n $(pwgen -s 17 -1) > /var/lib/secrets/wordpressdb 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/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/matrix_reg_secret -R
chown matrix-synapse:matrix-synapse /var/lib/secrets/matrixdb -R chown matrix-synapse:matrix-synapse /var/lib/secrets/matrixdb -R