43 lines
967 B
Nix
43 lines
967 B
Nix
{lib, ...}: {
|
|
services.rclone-sync = let
|
|
sync_defaults = {
|
|
serviceConfig = {after = ["secrets-init.service"];};
|
|
timerConfig = {
|
|
OnStartupSec = "60";
|
|
OnCalendar = "4h";
|
|
};
|
|
};
|
|
in {
|
|
enable = true;
|
|
user = "storage";
|
|
sync_jobs = map (x: lib.mkMerge [x sync_defaults]) [
|
|
# My B2
|
|
{
|
|
source = "StorageBox:Backups";
|
|
dest = "B2-Chaos-Backups:";
|
|
}
|
|
{
|
|
source = "StorageBox:Photos";
|
|
dest = "B2-Chaos-Photos:";
|
|
}
|
|
{
|
|
source = "StorageBox:Music";
|
|
dest = "B2-Chaos-Music:";
|
|
}
|
|
# Pheonix System's B2
|
|
{
|
|
source = "StorageBox:Backups";
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Backups";
|
|
}
|
|
{
|
|
source = "StorageBox:Photos";
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Photos";
|
|
}
|
|
{
|
|
source = "StorageBox:Music";
|
|
dest = "B2-Phoenix-Cryptidz-Storage:Music";
|
|
}
|
|
];
|
|
};
|
|
}
|