umount before mounting /Media, use /caches rather than /tmp for vfs cache
This commit is contained in:
parent
16e1973b66
commit
37875775d8
|
@ -8,16 +8,18 @@
|
|||
${pkgs.rclone}/bin/rclone --config ${secrets.rclone_config.path} "$@"
|
||||
'';
|
||||
mountMedia = pkgs.writeShellScriptBin "mount-media" ''
|
||||
umount -flR /Media || true
|
||||
${rcloneMedia}/bin/rclone-media mount Media-Combine: /Media \
|
||||
--allow-other \
|
||||
--uid=${toString config.users.users.jellyfin.uid} \
|
||||
--gid=${toString config.users.groups.jellyfin.gid} \
|
||||
--fast-list \
|
||||
--umask=666 \
|
||||
--cache-dir=/caches/media \
|
||||
--dir-cache-time=1m \
|
||||
--vfs-cache-mode=full \
|
||||
--vfs-cache-max-age=120m \
|
||||
--vfs-cache-max-size=5g \
|
||||
--vfs-cache-max-age=120m \
|
||||
--log-level=INFO "$@"
|
||||
'';
|
||||
in {
|
||||
|
@ -48,6 +50,9 @@ in {
|
|||
};
|
||||
|
||||
systemd.tmpfiles.rules = [
|
||||
"d /caches - root root"
|
||||
"d /caches/media - jellyfin jellyfin"
|
||||
|
||||
"d /Media - jellyfin jellyfin"
|
||||
|
||||
"d /root/.config - root root"
|
||||
|
|
Loading…
Reference in a new issue