Update mastodon to v4.2.1
This commit is contained in:
parent
a89f984c0f
commit
a40ff4193d
|
@ -1,33 +1,40 @@
|
|||
{ pkgs, ... }:
|
||||
{ pkgs, nixpkgs-unstable, ... }:
|
||||
let
|
||||
mastodonNekoversePatches = pkgs.fetchgit {
|
||||
url = "https://github.com/yuri-qq/nekoverse-mastodon-patches.git";
|
||||
hash = "sha256-6YXWc8LTPdZzP1TWBmVp00CyZXUIzZbMX85cwrIcAks=";
|
||||
hash = "sha256-HZP9UndsOcBhFV5T70R1HlYrCL+cqViZVJxHptxZKB8=";
|
||||
};
|
||||
mastodonNekoverseOverlay = final: prev: {
|
||||
mastodon = (prev.mastodon.override rec {
|
||||
version = "4.1.10";
|
||||
version = "4.2.1";
|
||||
srcOverride = final.applyPatches {
|
||||
src = final.fetchgit {
|
||||
url = "https://github.com/mastodon/mastodon.git";
|
||||
rev = "v${version}";
|
||||
sha256 = "sha256-22AhrI4wk/FhVJeRfhiI10MeYOJFoS0dwg3fWuWltoM=";
|
||||
sha256 = "sha256-SM9WdD+xpxo+gfBft9DARV6QjwNbF2Y9McVrrdDT3fw=";
|
||||
};
|
||||
patches = [
|
||||
"${mastodonNekoversePatches}/patches/001_increase_image_dimensions_limit.patch"
|
||||
"${mastodonNekoversePatches}/patches/002_disable_image_reprocessing.patch"
|
||||
#"${mastodonNekoversePatches}/patches/002_disable_image_reprocessing.patch"
|
||||
"${mastodonNekoversePatches}/patches/003_make_toot_cute.patch"
|
||||
"${mastodonNekoversePatches}/patches/005_improve_custom_emoji_support.patch"
|
||||
"${mastodonNekoversePatches}/patches/006_increase_display_name_character_limit.patch"
|
||||
"${mastodonNekoversePatches}/patches/007_increase_toot_character_limit.patch"
|
||||
];
|
||||
};
|
||||
yarnHash = "sha256-qoLesubmSvRsXhKwMEWHHXcpcqRszqcdZgHQqnTpNPE=";
|
||||
});
|
||||
};
|
||||
pkgs-overlay = pkgs.extend mastodonNekoverseOverlay;
|
||||
pkgs-overlay = nixpkgs-unstable.legacyPackages."x86_64-linux".extend mastodonNekoverseOverlay;
|
||||
vapidPublicKey = pkgs.writeText "vapid-public-key" "BDCbFEDCZ8eFuWr3uEq4Qc30UFZUQeNpF8OCw6OjPwAtaKS1yTM3Ue749Xjqy5WhBDjakzlixh4Gk7gluUhIdsU=";
|
||||
in
|
||||
{
|
||||
disabledModules = [ "services/web-apps/mastodon.nix" ];
|
||||
|
||||
imports = [
|
||||
"${nixpkgs-unstable}/nixos/modules/services/web-apps/mastodon.nix"
|
||||
];
|
||||
|
||||
services.mastodon = {
|
||||
enable = true;
|
||||
package = pkgs-overlay.mastodon;
|
||||
|
@ -44,6 +51,7 @@ in
|
|||
passwordFile = "/secrets/mastodon-email-smtp-pass.secret";
|
||||
fromAddress = "Nekoverse <nyareply@nekover.se>";
|
||||
};
|
||||
streamingProcesses = 3;
|
||||
extraConfig = {
|
||||
SMTP_TLS = "true";
|
||||
ES_PRESET = "single_node_cluster";
|
||||
|
|
|
@ -3,6 +3,22 @@
|
|||
services.nginx = {
|
||||
enable = true;
|
||||
group = "mastodon";
|
||||
upstreams.streaming = {
|
||||
extraConfig = ''
|
||||
least_conn;
|
||||
'';
|
||||
servers = {
|
||||
"unix:/run/mastodon-streaming/streaming-1.socket" = {
|
||||
fail_timeout = "0";
|
||||
};
|
||||
"unix:/run/mastodon-streaming/streaming-2.socket" = {
|
||||
fail_timeout = "0";
|
||||
};
|
||||
"unix:/run/mastodon-streaming/streaming-3.socket" = {
|
||||
fail_timeout = "0";
|
||||
};
|
||||
};
|
||||
};
|
||||
virtualHosts."social.nekover.se" = {
|
||||
forceSSL = true;
|
||||
enableACME = true;
|
||||
|
@ -29,7 +45,7 @@
|
|||
"/system/".alias = "/var/lib/mastodon/public-system/";
|
||||
|
||||
"^~ /api/v1/streaming" = {
|
||||
proxyPass = "http://unix:/run/mastodon-streaming/streaming.socket";
|
||||
proxyPass = "http://streaming";
|
||||
proxyWebsockets = true;
|
||||
};
|
||||
|
||||
|
|
Loading…
Reference in a new issue