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:
parent
702a4dd0e2
commit
3f6eb10dbd
2 changed files with 10 additions and 7 deletions
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue