some rclone changes
This commit is contained in:
parent
d1df256611
commit
850c6b7ea6
4 changed files with 34 additions and 19 deletions
|
|
@ -1,15 +0,0 @@
|
||||||
{ ... }:
|
|
||||||
{
|
|
||||||
imports = [
|
|
||||||
./hardware-configuration.nix
|
|
||||||
./modules/generic.nix
|
|
||||||
./modules/rclone.nix
|
|
||||||
./modules/borg.nix
|
|
||||||
./modules/postgresql.nix
|
|
||||||
./modules/nextcloud.nix
|
|
||||||
./modules/navidrome.nix
|
|
||||||
./modules/ombi.nix
|
|
||||||
];
|
|
||||||
}
|
|
||||||
|
|
||||||
# vim: set et ts=2 sw=2 ai:
|
|
||||||
14
modules/rclone-options.nix
Normal file
14
modules/rclone-options.nix
Normal file
|
|
@ -0,0 +1,14 @@
|
||||||
|
{ lib, ... }:
|
||||||
|
|
||||||
|
#with lib;
|
||||||
|
|
||||||
|
{
|
||||||
|
options.services.rclone = {
|
||||||
|
cacheSize = lib.mkOption {
|
||||||
|
type = lib.types.str;
|
||||||
|
default = "20G";
|
||||||
|
description = "The maximum size of the vfs cache";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
||||||
|
# vim: set et ts=2 sw=2 ai:
|
||||||
|
|
@ -1,12 +1,25 @@
|
||||||
{ pkgs, ... }:
|
{ config, pkgs, lib, ... }:
|
||||||
|
|
||||||
let
|
let
|
||||||
mountdir = "/mnt/genc";
|
mountdir = "/mnt/genc";
|
||||||
mountdir2 = "/mnt/gdrive";
|
mountdir2 = "/mnt/gdrive";
|
||||||
cachedir = "/mnt/cache";
|
cachedir = "/mnt/cache";
|
||||||
user = "mc-fucker";
|
user = "mc-fucker";
|
||||||
group = "users";
|
group = "users";
|
||||||
|
cfg = config.services.rclone;
|
||||||
in
|
in
|
||||||
{
|
{
|
||||||
|
|
||||||
|
# options.services.rclone = {
|
||||||
|
# cacheSize = lib.mkOption {
|
||||||
|
# type = lib.types.str;
|
||||||
|
# default = "20G";
|
||||||
|
# description = "The maximum size of the vfs cache";
|
||||||
|
# };
|
||||||
|
# };
|
||||||
|
|
||||||
|
imports = [ ./rclone-options.nix ];
|
||||||
|
|
||||||
programs.fuse.userAllowOther = true;
|
programs.fuse.userAllowOther = true;
|
||||||
systemd.services.genc_mount = {
|
systemd.services.genc_mount = {
|
||||||
description = "mount encrypted gdrive";
|
description = "mount encrypted gdrive";
|
||||||
|
|
@ -36,7 +49,7 @@ in
|
||||||
--drive-pacer-min-sleep 10ms \
|
--drive-pacer-min-sleep 10ms \
|
||||||
--drive-pacer-burst 1000 \
|
--drive-pacer-burst 1000 \
|
||||||
--vfs-cache-mode full \
|
--vfs-cache-mode full \
|
||||||
--vfs-cache-max-size 20G \
|
--vfs-cache-max-size ${cfg.cacheSize} \
|
||||||
--vfs-cache-max-age 5000h \
|
--vfs-cache-max-age 5000h \
|
||||||
--vfs-cache-poll-interval 5m
|
--vfs-cache-poll-interval 5m
|
||||||
'';
|
'';
|
||||||
|
|
@ -77,7 +90,7 @@ in
|
||||||
--drive-pacer-min-sleep 10ms \
|
--drive-pacer-min-sleep 10ms \
|
||||||
--drive-pacer-burst 1000 \
|
--drive-pacer-burst 1000 \
|
||||||
--vfs-cache-mode full \
|
--vfs-cache-mode full \
|
||||||
--vfs-cache-max-size 20G \
|
--vfs-cache-max-size ${cfg.cacheSize} \
|
||||||
--vfs-cache-max-age 5000h \
|
--vfs-cache-max-age 5000h \
|
||||||
--vfs-cache-poll-interval 5m
|
--vfs-cache-poll-interval 5m
|
||||||
'';
|
'';
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,5 @@
|
||||||
{ ... }: {
|
{ ... }:
|
||||||
|
{
|
||||||
imports = [
|
imports = [
|
||||||
./hardware-configuration.nix
|
./hardware-configuration.nix
|
||||||
./modules/generic.nix
|
./modules/generic.nix
|
||||||
|
|
@ -7,8 +8,10 @@
|
||||||
./modules/postgresql.nix
|
./modules/postgresql.nix
|
||||||
./modules/nextcloud.nix
|
./modules/nextcloud.nix
|
||||||
./modules/navidrome.nix
|
./modules/navidrome.nix
|
||||||
|
./modules/ombi.nix
|
||||||
];
|
];
|
||||||
|
|
||||||
|
services.rclone.cacheSize = "100G";
|
||||||
}
|
}
|
||||||
|
|
||||||
# vim: set et ts=2 sw=2 ai:
|
# vim: set et ts=2 sw=2 ai:
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue