diff --git a/nixos/boxes/vpsfree1/mastodon.nix b/nixos/boxes/vpsfree1/mastodon.nix index 9f31add1..e11c8e37 100644 --- a/nixos/boxes/vpsfree1/mastodon.nix +++ b/nixos/boxes/vpsfree1/mastodon.nix @@ -31,6 +31,7 @@ members = ["${systemUserName}" "nginx"]; }; }; + tootctlPath = "/run/current-system/sw/bin/mastodon-tootctl"; secretSettings = { owner = systemUserName; group = systemGroupName; @@ -126,13 +127,15 @@ in { systemd.services.mastodon-media-auto-remove = { description = "Mastodon media auto remove"; serviceConfig = { + User = systemUserName; + Group = systemGroupName; Type = "oneshot"; EnvironmentFile = "/var/lib/mastodon/.secrets_env"; }; script = '' - /run/current-system/sw/bin/mastodon-tootctl media remove --days=8 --prune-profiles --include-follows -c1 - /run/current-system/sw/bin/mastodon-tootctl media remove --days=8 --remove-headers --include-follows -c1 - /run/current-system/sw/bin/mastodon-tootctl preview_cards remove --days=8 + ${tootctlPath} media remove --days=8 --prune-profiles --include-follows -c1 + ${tootctlPath} media remove --days=8 --remove-headers --include-follows -c1 + ${tootctlPath} preview_cards remove --days=8 ''; startAt = "daily"; }; @@ -153,7 +156,7 @@ in { createLocally = false; passwordFile = "${mailgunSmtpPasswordPath}"; }; - sidekiqThreads = 2; + sidekiqThreads = 8; extraConfig = { SMTP_TLS = "true"; SMTP_ENABLE_STARTTLS_AUTO = "true";