nixfiles/hosts/hetzner-vm/containers/storage/profiles/rclone-sync.nix

49 lines
1.1 KiB
Nix
Raw Normal View History

2022-12-04 16:10:00 +00:00
{lib, ...}: {
2022-11-15 14:52:49 +00:00
services.rclone-sync = let
sync_defaults = {
serviceConfig = {after = ["auto-secrets.service"];};
2022-11-15 14:52:49 +00:00
timerConfig = {
OnStartupSec = "60";
OnCalendar = "4h";
};
};
in {
enable = true;
user = "storage";
sync_jobs = map (x: lib.mkMerge [x sync_defaults]) [
2022-11-15 14:52:49 +00:00
# My B2
{
source = "StorageBox:Backups";
dest = "B2-Chaos-Backups:";
2023-03-19 11:44:27 +00:00
id = "chaos_b2_backups";
2022-11-15 14:52:49 +00:00
}
{
source = "StorageBox:Photos";
dest = "B2-Chaos-Photos:";
2023-03-19 11:44:27 +00:00
id = "chaos_b2_photos";
2022-11-15 14:52:49 +00:00
}
{
source = "StorageBox:Music";
dest = "B2-Chaos-Music:";
2023-03-19 11:44:27 +00:00
id = "chaos_b2_music";
2022-11-15 14:52:49 +00:00
}
# Pheonix System's B2
{
source = "StorageBox:Backups";
dest = "B2-Phoenix-Cryptidz-Storage:Backups";
2023-03-19 11:44:27 +00:00
id = "phoenix_b2_backups";
2022-11-15 14:52:49 +00:00
}
{
source = "StorageBox:Photos";
dest = "B2-Phoenix-Cryptidz-Storage:Photos";
2023-03-19 11:44:27 +00:00
id = "phoenix_b2_photos";
2022-11-15 14:52:49 +00:00
}
{
source = "StorageBox:Music";
dest = "B2-Phoenix-Cryptidz-Storage:Music";
2023-03-19 11:44:27 +00:00
id = "phoenix_b2_music";
2022-11-15 14:52:49 +00:00
}
];
};
}