Update rclone

This commit is contained in:
2022-07-20 03:16:10 +01:00
parent 68438ec798
commit fee153eb72

View File

@@ -5,7 +5,7 @@
}: let }: let
mountdir = "/var/media/dungflix"; mountdir = "/var/media/dungflix";
file = '' rclone_config = pkgs.writeText "" ''
[dungflix] [dungflix]
type = b2 type = b2
@@ -30,7 +30,7 @@ in {
export RCLONE_B2_ACCOUNT=''$(cat ${config.age.secrets.dungflix_bucket_account_id.path}) export RCLONE_B2_ACCOUNT=''$(cat ${config.age.secrets.dungflix_bucket_account_id.path})
export RCLONE_B2_KEY=''$(cat ${config.age.secrets.dungflix_bucket_account_key.path}) export RCLONE_B2_KEY=''$(cat ${config.age.secrets.dungflix_bucket_account_key.path})
export RCLONE_CRYPT_PASSWORD=''$(cat ${config.age.secrets.dungflix_crypt_remote_obscured_pass.path}) export RCLONE_CRYPT_PASSWORD=''$(cat ${config.age.secrets.dungflix_crypt_remote_obscured_pass.path})
${pkgs.rclone}/bin/rclone --config="${pkgs.writeText "" file}" mount dungflix-vault: ${mountdir} \ ${pkgs.rclone}/bin/rclone --config="${rclone_config}" mount dungflix-vault: ${mountdir} \
--transfers 32 \ --transfers 32 \
--vfs-cache-mode full \ --vfs-cache-mode full \
--vfs-cache-max-age 168h \ --vfs-cache-max-age 168h \
@@ -38,14 +38,16 @@ in {
--allow-other \ --allow-other \
--no-modtime \ --no-modtime \
--buffer-size 2G \ --buffer-size 2G \
--fast-list \
--rc \ --rc \
--rc-no-auth \ --rc-no-auth \
-vv -vv
''; '';
postStart = '' postStart = ''
sleep 5 sleep 5
${pkgs.rclone}/bin/rclone rc vfs/refresh recursive=true _async=true ${pkgs.rclone}/bin/rclone --config="${rclone_config}" rc vfs/refresh recursive=true _async=true
''; '';
serviceConfig = {
Restart = "on-failure";
};
}; };
} }