summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorlassulus <lassulus@lassul.us>2023-08-26 08:24:47 +0200
committerlassulus <lassulus@lassul.us>2023-08-26 08:24:47 +0200
commit36eaa0d88d631905e9d439a6b2b7ae6e6df84919 (patch)
treec0903f036a958a15ca9506f591f7bc7efac5f181
parent4acff6e9e977352a1e6ec7a86f0b060a9234f248 (diff)
mastodon: add clear-cache command
-rw-r--r--krebs/2configs/mastodon.nix6
1 files changed, 4 insertions, 2 deletions
diff --git a/krebs/2configs/mastodon.nix b/krebs/2configs/mastodon.nix
index 145b383ed..af308b2c7 100644
--- a/krebs/2configs/mastodon.nix
+++ b/krebs/2configs/mastodon.nix
@@ -33,8 +33,10 @@
];
environment.systemPackages = [
- (pkgs.writers.writeDashBin "tootctl" ''
- sudo -u mastodon /etc/profiles/per-user/mastodon/bin/mastodon-env /etc/profiles/per-user/mastodon/bin/tootctl "$@"
+ (pkgs.writers.writeDashBin "clear-mastodon-cache" ''
+ mastodon-tootctl media remove --prune-profiles --days=14 --concurrency=30
+ mastodon-tootctl media remove-orphans
+ mastodon-tootctl preview_cards remove --days=14
'')
(pkgs.writers.writeDashBin "create-mastodon-user" ''
set -efu