Improve filebrowser and rclone

This commit is contained in:
2025-12-01 23:32:24 +01:00
parent 830c3ebe5a
commit 9607277667
4 changed files with 64 additions and 12 deletions

View File

@@ -1,7 +1,19 @@
{ config, ... }:
{
config,
pkgs,
...
}:
{
programs.rclone = {
enable = true;
# Give rclone access to the ssh agent
package = pkgs.writeShellScriptBin "rclone" ''
export GNUPGHOME="${config.xdg.dataHome}/gnupg"
export SSH_AUTH_SOCK=$(${pkgs.gnupg}/bin/gpgconf --list-dirs agent-ssh-socket)
exec ${pkgs.rclone}/bin/rclone "$@"
'';
remotes = {
gdrive = {
config = {
@@ -24,9 +36,35 @@
mountPoint = "${config.home.homeDirectory}/gdrive";
options = {
dir-cache-time = "5000h";
dir-cache-time = "5m";
poll-interval = "10s";
vfs-cache-mode = "full";
};
};
};
};
orion = {
config = {
type = "sftp";
user = config.var.username;
};
secrets = {
host = config.sops.secrets.orion_ip.path;
};
mounts = {
"/var/lib/filebrowser/files" = {
enable = true;
mountPoint = "${config.home.homeDirectory}/orion";
options = {
dir-cache-time = "5m";
poll-interval = "10s";
# Network optimizations
"buffer-size" = "32M";
"vfs-read-chunk-size" = "32M";
};
};
};