Automatically clean up old torrent files

This commit is contained in:
Pim Kunis 2025-03-23 13:54:29 +01:00
parent 10d7e92c0d
commit 274ff4b98c

View file

@ -24,7 +24,8 @@
backups.enable = true;
};
systemd.timers.read-dir-sizes = {
systemd = {
timers.read-dir-sizes = {
wantedBy = ["timers.target"];
timerConfig = {
OnBootSec = "5m";
@ -33,7 +34,7 @@
};
};
systemd.services."read-dir-sizes" = {
services."read-dir-sizes" = {
script = let
script = pkgs.writeShellScriptBin "read-dir-sizes.sh" ''
DIRS=(
@ -65,6 +66,11 @@
};
};
tmpfiles.rules = [
"d /mnt/longhorn/persistent/media/torrents 775 414 51 8d"
];
};
services.prometheus.exporters.node.extraFlags = ["--collector.textfile.directory=/var/lib/node_exporter/textfile_collector"];
};
}