forked from mirrors/nixpkgs
nixos/mastodon: fix definition of mastodon-media-auto-remove
This commit is contained in:
parent
702a4dd0e2
commit
3f6eb10dbd
|
@ -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 {
|
||||
|
|
|
@ -129,6 +129,9 @@ in
|
|||
ca.wait_for_unit("step-ca.service")
|
||||
ca.wait_for_open_port(8443)
|
||||
|
||||
# Check that mastodon-media-auto-remove is scheduled
|
||||
server.succeed("systemctl status mastodon-media-auto-remove.timer")
|
||||
|
||||
server.wait_for_unit("nginx.service")
|
||||
server.wait_for_unit("redis-mastodon.service")
|
||||
server.wait_for_unit("postgresql.service")
|
||||
|
|
Loading…
Reference in a new issue