···2424 BOOTSNAP_CACHE_DIR = "/var/cache/mastodon/precompile";
2525 LD_PRELOAD = "${pkgs.jemalloc}/lib/libjemalloc.so";
26262727- MASTODON_USE_LIBVIPS = "true";
2828-2927 # Concurrency mastodon-web
3028 WEB_CONCURRENCY = toString cfg.webProcesses;
3129 MAX_THREADS = toString cfg.webThreads;
···196194 path = with pkgs; [
197195 ffmpeg-headless
198196 file
199199- imagemagick
200197 ];
201198 }
202199 )
···257254 "mastodon"
258255 "streamingPort"
259256 ] "Mastodon currently doesn't support streaming via TCP ports. Please open a PR if you need this.")
257257+ (lib.mkRemovedOptionModule [
258258+ "services"
259259+ "mastodon"
260260+ "otpSecretFile"
261261+ ] "The OTP_SECRET option was removed from Mastodon in version 4.4.0")
260262 ];
261263262264 options = {
···490492 type = lib.types.str;
491493 };
492494493493- otpSecretFile = lib.mkOption {
494494- description = ''
495495- Path to file containing the OTP secret.
496496- A new OTP secret can be generated by running:
497497-498498- `nix build -f '<nixpkgs>' mastodon; cd result; bin/bundle exec rails secret`
499499-500500- If this file does not exist, it will be created with a new OTP secret.
501501- '';
502502- default = "/var/lib/mastodon/secrets/otp-secret";
503503- type = lib.types.str;
504504- };
505505-506495 trustedProxy = lib.mkOption {
507496 description = ''
508497 You need to set it to the IP from which your reverse proxy sends requests to Mastodon's web process,
···892881 mkdir -p $(dirname ${cfg.secretKeyBaseFile})
893882 bin/bundle exec rails secret > ${cfg.secretKeyBaseFile}
894883 fi
895895- if ! test -f ${cfg.otpSecretFile}; then
896896- mkdir -p $(dirname ${cfg.otpSecretFile})
897897- bin/bundle exec rails secret > ${cfg.otpSecretFile}
898898- fi
899884 if ! test -f ${cfg.vapidPrivateKeyFile}; then
900885 mkdir -p $(dirname ${cfg.vapidPrivateKeyFile}) $(dirname ${cfg.vapidPublicKeyFile})
901886 keypair=$(bin/rake webpush:generate_keys)
···908893 ACTIVE_RECORD_ENCRYPTION_KEY_DERIVATION_SALT="$(cat ${cfg.activeRecordEncryptionKeyDerivationSaltFile})"
909894 ACTIVE_RECORD_ENCRYPTION_PRIMARY_KEY="$(cat ${cfg.activeRecordEncryptionPrimaryKeyFile})"
910895 SECRET_KEY_BASE="$(cat ${cfg.secretKeyBaseFile})"
911911- OTP_SECRET="$(cat ${cfg.otpSecretFile})"
912896 VAPID_PRIVATE_KEY="$(cat ${cfg.vapidPrivateKeyFile})"
913897 VAPID_PUBLIC_KEY="$(cat ${cfg.vapidPublicKeyFile})"
914898 ''