From d20c8d40a4b767ea56bc7c32a9118689376397f4 Mon Sep 17 00:00:00 2001 From: coolneng Date: Mon, 13 Jun 2022 12:21:55 +0200 Subject: [PATCH] Clean up Mopidy cache monthly --- modules/periodic.nix | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/modules/periodic.nix b/modules/periodic.nix index 82a8844..af50bf4 100644 --- a/modules/periodic.nix +++ b/modules/periodic.nix @@ -120,4 +120,14 @@ in { startAt = "14:00:00"; after = [ "network-online.target" ]; }; + + # Clean up Mopidy cache monthly + systemd.services.mopidy-cleanup = { + description = "Clean up Mopidy cache monthly"; + path = [ coreutils ]; + script = "${pkgs.coreutils}/bin/rm -rf /var/lib/mopidy/.cache/*"; + serviceConfig.Type = "oneshot"; + startAt = "*-*-15 14:00:00"; + after = [ "network-online.target" ]; + }; }