Improve filebrowser and rclone
This commit is contained in:
@@ -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";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user