From e43cb021ce200727f6a05f677aa6e31d8ab1e4a0 Mon Sep 17 00:00:00 2001 From: teutat3s Date: Sat, 28 Oct 2023 15:36:13 +0200 Subject: [PATCH] feat: use mastodon version 4.2.1 from our fork This still needs updates in the NixOS module to account for the changes in https://github.com/mastodon/mastodon/pull/24655 that change how multiple streaming processes run. Hopefully this is fine for a single streaming process though. https://github.com/NixOS/nixpkgs/pull/251950 https://github.com/teutat3s/nixpkgs/tree/mastodon-4.2.1 --- flake.lock | 17 +++++++++++++++++ flake.nix | 3 +++ hosts/nachtigall/apps/mastodon.nix | 2 +- overlays/default.nix | 17 +++++++++++++++++ 4 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 overlays/default.nix diff --git a/flake.lock b/flake.lock index d3e72ee..56eb596 100644 --- a/flake.lock +++ b/flake.lock @@ -150,6 +150,22 @@ "type": "github" } }, + "mastodon-fork": { + "locked": { + "lastModified": 1698490885, + "narHash": "sha256-Ic2YgJ7vlAoiihho4pJgHewIubIZQpv1L8ePRB1wfG4=", + "owner": "teutat3s", + "repo": "nixpkgs", + "rev": "534d90c65614f05e543fd11b3f4acd748704a625", + "type": "github" + }, + "original": { + "owner": "teutat3s", + "ref": "mastodon-4.2.1", + "repo": "nixpkgs", + "type": "github" + } + }, "nix-darwin": { "inputs": { "nixpkgs": [ @@ -226,6 +242,7 @@ "deploy-rs": "deploy-rs", "flake-parts": "flake-parts", "home-manager": "home-manager", + "mastodon-fork": "mastodon-fork", "nix-darwin": "nix-darwin", "nixos-flake": "nixos-flake", "nixpkgs": "nixpkgs", diff --git a/flake.nix b/flake.nix index 2703a1a..8b46b54 100644 --- a/flake.nix +++ b/flake.nix @@ -3,6 +3,7 @@ # Track channels with commits tested and built by hydra nixpkgs.url = "github:nixos/nixpkgs/nixos-23.05"; unstable.url = "github:nixos/nixpkgs/nixos-unstable"; + mastodon-fork.url = "github:teutat3s/nixpkgs/mastodon-4.2.1"; nix-darwin.url = "github:lnl7/nix-darwin/master"; nix-darwin.inputs.nixpkgs.follows = "nixpkgs"; @@ -34,6 +35,7 @@ # ./terraform.nix ./public-keys ./lib + ./overlays ]; perSystem = { system, pkgs, config, ... }: { @@ -79,6 +81,7 @@ self.pub-solar.lib.linux.unlockZFSOnBoot self.nixosModules.home-manager self.nixosModules.linux + self.nixosModules.overlays inputs.agenix.nixosModules.default { home-manager.users.${username} = { diff --git a/hosts/nachtigall/apps/mastodon.nix b/hosts/nachtigall/apps/mastodon.nix index a40d0cf..4f978ca 100644 --- a/hosts/nachtigall/apps/mastodon.nix +++ b/hosts/nachtigall/apps/mastodon.nix @@ -1,4 +1,4 @@ -{ config, pkgs, flake, ... }: +{ config, pkgs, flake, inputs, ... }: { age.secrets."mastodon-secret-key-base" = { diff --git a/overlays/default.nix b/overlays/default.nix new file mode 100644 index 0000000..7bfa77b --- /dev/null +++ b/overlays/default.nix @@ -0,0 +1,17 @@ +{ + self, + inputs, + ... +}: { + flake = { + nixosModules = rec { + overlays = ({ ... }: { + nixpkgs.overlays = [ + (final: prev: { + mastodon = inputs.mastodon-fork.legacyPackages.${prev.system}.mastodon; + }) + ]; + }); + }; + }; +}