{ inputs = { nixpkgs.url = "github:nixos/nixpkgs/nixpkgs-unstable"; }; outputs = { self, nixpkgs, ...} @ inputs: let systems = [ "aarch64-linux" "x86_64-linux" ]; forAllSystems = nixpkgs.lib.genAttrs systems; in rec { devShells = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; in pkgs.mkShell { buildInputs = with pkgs; [ just ]; } ); nixosModules = rec { default = enableTachikoma; enableTachikoma = { pkgs, ...}: { services.akkoma.package = packages.${pkgs.system}.akkoma.tachikoma; services.akkoma.frontends.primary = { name = "tachikoma-fe"; ref = "stable"; package = packages.${pkgs.system}.akkoma-frontends.tachikoma-fe; }; }; }; packages = forAllSystems (system: let pkgs = nixpkgs.legacyPackages.${system}; lib = pkgs.lib; patchSet = dirPath: builtins.filterList (file: lib.strings.hasSuffix ".patch" file) (builtins.attrNames (builtins.readDir dirPath)); in rec { default = akkoma.tachikoma; akkoma.tachikoma = let rev = builtins.readFile ./akkoma/upstream.txt; in pkgs.akkoma.overrideAttrs (final: prev: { version = "${rev}-tachikoma"; src = fetchFromGitea { inherit rev; domain = "akkoma.dev"; owner = "AkkomaGang"; repo = "akkoma"; hash = "sha256-MPUZFcIxZ21fe3edwi+/Kt8qpwNBCh40wheC3QMqw2M="; }; patches = prev.patches ++ patchSet ./akkoma; patchFlags = "-p1 -F5"; }); akkoma-frontends.tachikoma-fe = let rev = builtins.readFile ./akkoma-fe/upstream.txt; in pkgs.akkoma-frontends.tachikoma-fe.overrideAttrs (final: prev: { version = "${rev}-tachikoma"; src = fetchFromGitea { inherit rev; domain = "akkoma.dev"; owner = "AkkomaGang"; repo = "akkoma-fe"; hash = "sha256-MPUZFcIxZ21fe3edwi+/Kt8qpwNBCh40wheC3QMqw2M="; }; patches = prev.patches ++ patchSet ./akkoma-fe; patchFlags = "-p1 -F5"; }); }); }; }