add gotosocial in overlay to update to v0.11.0

This commit is contained in:
chaos 2023-08-20 22:28:18 +01:00
parent a8cc729919
commit f7f91e938d
No known key found for this signature in database
3 changed files with 43 additions and 3 deletions

View file

@ -3,7 +3,7 @@
enable = true; enable = true;
setupPostgresqlDB = true; setupPostgresqlDB = true;
settings = { settings = {
application-name = "Chaos"; application-name = "chaos-gts";
host = "gts-01.owo.monster"; host = "gts-01.owo.monster";
bind-address = "0.0.0.0"; bind-address = "0.0.0.0";
@ -15,16 +15,25 @@
accounts-registration-open = false; accounts-registration-open = false;
media-remote-cache-days = 2;
media-image-max-size = 1000000 * 64; # MB media-image-max-size = 1000000 * 64; # MB
media-video-max-size = 1000000 * 1024; # MB media-video-max-size = 1000000 * 1024; # MB
media-description-max-chars = 4000; media-description-max-chars = 4000;
media-remote-cache-days = 3;
media-emoji-local-max-size = 102400; media-emoji-local-max-size = 102400;
media-emoji-remote-max-size = 102400; media-emoji-remote-max-size = 102400;
statuses-cw-max-chars = 150; statuses-cw-max-chars = 150;
statuses-poll-max-options = 10; statuses-poll-max-options = 10;
statuses-media-max-files = 8; statuses-media-max-files = 8;
# only enable when testing out mastodon-api applications
# that use instance version for api compatibility checks
# instance-inject-mastodon-version = true;
cache = {
memory-target = "256MiB";
};
}; };
}; };
} }

View file

@ -54,5 +54,6 @@ in
inherit (pkgs) comic-code comic-sans; inherit (pkgs) comic-code comic-sans;
inherit (pkgs) piped-frontend piped-backend piped-proxy; inherit (pkgs) piped-frontend piped-backend piped-proxy;
inherit (pkgs) mk-enc-usb mk-normal-enc-ssd; inherit (pkgs) mk-enc-usb mk-normal-enc-ssd;
inherit (pkgs) gotosocial;
}; };
})) }))

View file

@ -1,4 +1,4 @@
final: _prev: { final: prev: {
comic-sans = final.callPackage ./comic-sans {}; comic-sans = final.callPackage ./comic-sans {};
comic-code = final.callPackage ./comic-code {}; comic-code = final.callPackage ./comic-code {};
roc-toolkit-patched = final.callPackage ./roc-toolkit-patched {}; roc-toolkit-patched = final.callPackage ./roc-toolkit-patched {};
@ -11,4 +11,34 @@ final: _prev: {
piped-proxy = final.callPackage ./piped/proxy {}; piped-proxy = final.callPackage ./piped/proxy {};
mk-enc-usb = final.callPackage ../extras/mk-enc-usb.nix {}; mk-enc-usb = final.callPackage ../extras/mk-enc-usb.nix {};
mk-normal-enc-ssd = final.callPackage ../extras/mk-normal-enc-ssd.nix {}; mk-normal-enc-ssd = final.callPackage ../extras/mk-normal-enc-ssd.nix {};
gotosocial = prev.gotosocial.overrideAttrs (old: let
owner = "superseriousbusiness";
repo = "gotosocial";
version = "0.11.0";
source-hash = "sha256-qbq5pDvG2L1s6BG+sh7eagcFNH/DWyANMQaAl2WcQzE=";
web-assets-hash = "sha256-NK5m+ERZQtl5Stq2+bWw0LS2SbmlhEJDZjTTxYciemE=";
web-assets = final.fetchurl {
url = "https://github.com/${owner}/${repo}/releases/download/v${version}/${repo}_${version}_web-assets.tar.gz";
hash = web-assets-hash;
};
in {
inherit version;
src = final.fetchFromGitHub {
inherit owner repo;
rev = "refs/tags/v${version}";
hash = source-hash;
};
ldflags = ["-s" "-w" "-X main.Version=${version}"];
doCheck = false;
postInstall = ''
tar xf ${web-assets}
mkdir -p $out/share/gotosocial
mv web $out/share/gotosocial/
'';
});
} }