···24 BOOTSNAP_CACHE_DIR = "/var/cache/mastodon/precompile";
25 LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
2627- MASTODON_USE_LIBVIPS = "true";
28-29 # Concurrency mastodon-web
30 WEB_CONCURRENCY = toString cfg.webProcesses;
31 MAX_THREADS = toString cfg.webThreads;
···196 path = with pkgs; [
197 ffmpeg-headless
198 file
199- imagemagick
200 ];
201 }
202 )
···257 "mastodon"
258 "streamingPort"
259 ] "Mastodon currently doesn't support streaming via TCP ports. Please open a PR if you need this.")
00000260 ];
261262 options = {
···490 type = lib.types.str;
491 };
492493- otpSecretFile = lib.mkOption {
494- description = ''
495- Path to file containing the OTP secret.
496- A new OTP secret can be generated by running:
497-498- `nix build -f '<nixpkgs>' mastodon; cd result; bin/bundle exec rails secret`
499-500- If this file does not exist, it will be created with a new OTP secret.
501- '';
502- default = "/var/lib/mastodon/secrets/otp-secret";
503- type = lib.types.str;
504- };
505-506 trustedProxy = lib.mkOption {
507 description = ''
508 You need to set it to the IP from which your reverse proxy sends requests to Mastodon's web process,
···892 mkdir -p $(dirname ${cfg.secretKeyBaseFile})
893 bin/bundle exec rails secret > ${cfg.secretKeyBaseFile}
894 fi
895- if ! test -f ${cfg.otpSecretFile}; then
896- mkdir -p $(dirname ${cfg.otpSecretFile})
897- bin/bundle exec rails secret > ${cfg.otpSecretFile}
898- fi
899 if ! test -f ${cfg.vapidPrivateKeyFile}; then
900 mkdir -p $(dirname ${cfg.vapidPrivateKeyFile}) $(dirname ${cfg.vapidPublicKeyFile})
901 keypair=$(bin/rake webpush:generate_keys)
···908 ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="$(cat ${cfg.activeRecordEncryptionKeyDerivationSaltFile})"
909 ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="$(cat ${cfg.activeRecordEncryptionPrimaryKeyFile})"
910 SECRET_KEY_BASE="$(cat ${cfg.secretKeyBaseFile})"
911- OTP_SECRET="$(cat ${cfg.otpSecretFile})"
912 VAPID_PRIVATE_KEY="$(cat ${cfg.vapidPrivateKeyFile})"
913 VAPID_PUBLIC_KEY="$(cat ${cfg.vapidPublicKeyFile})"
914 ''
···24 BOOTSNAP_CACHE_DIR = "/var/cache/mastodon/precompile";
25 LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
260027 # Concurrency mastodon-web
28 WEB_CONCURRENCY = toString cfg.webProcesses;
29 MAX_THREADS = toString cfg.webThreads;
···194 path = with pkgs; [
195 ffmpeg-headless
196 file
0197 ];
198 }
199 )
···254 "mastodon"
255 "streamingPort"
256 ] "Mastodon currently doesn't support streaming via TCP ports. Please open a PR if you need this.")
257+ (lib.mkRemovedOptionModule [
258+ "services"
259+ "mastodon"
260+ "otpSecretFile"
261+ ] "The OTP_SECRET option was removed from Mastodon in version 4.4.0")
262 ];
263264 options = {
···492 type = lib.types.str;
493 };
4940000000000000495 trustedProxy = lib.mkOption {
496 description = ''
497 You need to set it to the IP from which your reverse proxy sends requests to Mastodon's web process,
···881 mkdir -p $(dirname ${cfg.secretKeyBaseFile})
882 bin/bundle exec rails secret > ${cfg.secretKeyBaseFile}
883 fi
0000884 if ! test -f ${cfg.vapidPrivateKeyFile}; then
885 mkdir -p $(dirname ${cfg.vapidPrivateKeyFile}) $(dirname ${cfg.vapidPublicKeyFile})
886 keypair=$(bin/rake webpush:generate_keys)
···893 ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="$(cat ${cfg.activeRecordEncryptionKeyDerivationSaltFile})"
894 ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="$(cat ${cfg.activeRecordEncryptionPrimaryKeyFile})"
895 SECRET_KEY_BASE="$(cat ${cfg.secretKeyBaseFile})"
0896 VAPID_PRIVATE_KEY="$(cat ${cfg.vapidPrivateKeyFile})"
897 VAPID_PUBLIC_KEY="$(cat ${cfg.vapidPublicKeyFile})"
898 ''