feat(nix): add cache for Rclone+GoogleDrive mount

This commit is contained in:
spy4x 2024-03-13 16:25:31 +08:00
parent 8f808b5c8c
commit 15e3f11fd8

View File

@ -156,7 +156,7 @@ in
serviceConfig = {
Type = "simple";
ExecStartPre = "${curBin}/mkdir -p ${gdrivePath}";
ExecStart = "${pkgs.rclone}/bin/rclone mount gdrive: ${gdrivePath}";
ExecStart = "${pkgs.rclone}/bin/rclone mount gdrive: ${gdrivePath} --vfs-cache-mode full --vfs-cache-max-age 72h --vfs-cache-max-size 100G --vfs-read-ahead 2G";
ExecStop = "${curBin}/fusermount -u ${gdrivePath}";
Restart = "on-failure";
RestartSec = "10s";