0
0
Fork 0
mirror of https://github.com/NixOS/nixpkgs.git synced 2025-07-14 06:00:33 +03:00

nixos/mastodon: fix definition of mastodon-media-auto-remove

This commit is contained in:
Justinas Stankevicius 2022-11-12 00:05:10 +02:00 committed by Kerstin
parent 702a4dd0e2
commit 3f6eb10dbd
2 changed files with 10 additions and 7 deletions

View file

@ -623,15 +623,15 @@ in {
environment = env;
serviceConfig = {
Type = "oneshot";
script = let
olderThanDays = toString cfg.mediaAutoRemove.olderThanDays;
in ''
${cfg.package}/bin/tootctl media remove --days=${olderThanDays}
${cfg.package}/bin/tootctl preview_cards remove --days=${olderThanDays}
'';
EnvironmentFile = "/var/lib/mastodon/.secrets_env";
startAt = cfg.mediaAutoRemove.startAt;
} // cfgService;
script = let
olderThanDays = toString cfg.mediaAutoRemove.olderThanDays;
in ''
${cfg.package}/bin/tootctl media remove --days=${olderThanDays}
${cfg.package}/bin/tootctl preview_cards remove --days=${olderThanDays}
'';
startAt = cfg.mediaAutoRemove.startAt;
};
services.nginx = lib.mkIf cfg.configureNginx {