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