make garage and rclone better
This commit is contained in:
parent
16788bc7b2
commit
9c72baf1c0
3 changed files with 22 additions and 12 deletions
|
@ -32,9 +32,17 @@
|
|||
serviceConfig = {
|
||||
Type = "notify";
|
||||
ExecStartPre = "/usr/bin/env mkdir -p /mnt/garage";
|
||||
ExecStart = "${lib.getExe pkgs.rclone} mount --config ${
|
||||
config.sops.secrets."rclone/config".path
|
||||
} --cache-dir /var/cache/rclone --transfers=32 --checkers=32 --vfs-cache-mode writes --vfs-cache-max-size 5G --allow-other rsyncnet:garage /mnt/garage ";
|
||||
ExecStart = ''
|
||||
${lib.getExe pkgs.rclone} mount \
|
||||
--config ${config.sops.secrets."rclone/config".path} \
|
||||
--allow-other \
|
||||
--cache-dir /var/cache/rclone \
|
||||
--transfers=32 --checkers=32 \
|
||||
--vfs-cache-mode writes \
|
||||
--vfs-cache-max-size 5G \
|
||||
--dir-cache-time 30d \
|
||||
rsyncnet:garage /mnt/garage
|
||||
'';
|
||||
ExecStop = "${lib.getExe' pkgs.fuse "fusermount"} -u /mnt/garage";
|
||||
};
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue