summary refs log tree commit diff
path: root/nixos/modules/services/web-apps/mastodon.nix
diff options
context:
space:
mode:
authorJustinas Stankevicius <justinas@justinas.org>2022-11-12 00:05:10 +0200
committerKerstin <kerstin@erictapen.name>2022-11-12 22:22:41 +0100
commit3f6eb10dbdff395a322c1b9f9167784096064278 (patch)
tree2a7d3fc6872c28cde3d637349b325f2a87813547 /nixos/modules/services/web-apps/mastodon.nix
parent702a4dd0e20b80aae468707f4873412be92b657a (diff)
downloadnixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar.gz
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar.bz2
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar.lz
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar.xz
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.tar.zst
nixpkgs-3f6eb10dbdff395a322c1b9f9167784096064278.zip
nixos/mastodon: fix definition of mastodon-media-auto-remove
Diffstat (limited to 'nixos/modules/services/web-apps/mastodon.nix')
-rw-r--r--nixos/modules/services/web-apps/mastodon.nix14
1 files changed, 7 insertions, 7 deletions
diff --git a/nixos/modules/services/web-apps/mastodon.nix b/nixos/modules/services/web-apps/mastodon.nix
index 83890e96990..d159d2ade06 100644
--- a/nixos/modules/services/web-apps/mastodon.nix
+++ b/nixos/modules/services/web-apps/mastodon.nix
@@ -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 {