nixos-config/machines/chungus/sync-rbackup.nix
2024-06-07 22:56:52 +02:00

40 lines
1.3 KiB
Nix

{ config, factsGenerator, ... }:
let
tld = config.clan.static-hosts.topLevelDomain;
in
{
clanCore.facts.services.rbackup = factsGenerator.ssh { name = "rbackup"; };
# todo : replace all of them with syncoid
rbackup.plans = {
git = {
sshKeyPath = config.clanCore.facts.services.rbackup.secret."ssh.rbackup.id_ed25519".path;
src = "root@orbi.${tld}:/var/lib/forgejo/";
dst = "/mirror/git";
};
taskwarrior = {
sshKeyPath = config.clanCore.facts.services.rbackup.secret."ssh.rbackup.id_ed25519".path;
src = "root@orbi.${tld}:/var/lib/taskserver/";
dst = "/mirror/taskwarrior";
};
vaultwarden = {
sshKeyPath = config.clanCore.facts.services.rbackup.secret."ssh.rbackup.id_ed25519".path;
src = "root@orbi.${tld}:/var/lib/bitwarden_rs/";
dst = "/mirror/vaultwarden";
};
radarr = {
sshKeyPath = config.clanCore.facts.services.rbackup.secret."ssh.rbackup.id_ed25519".path;
src = "root@orbi.${tld}:/media/arr/radarr";
dst = "/media/arr/radarr";
delete = false;
};
sonarr = {
sshKeyPath = config.clanCore.facts.services.rbackup.secret."ssh.rbackup.id_ed25519".path;
src = "root@orbi.${tld}:/media/arr/sonarr";
dst = "/media/arr/sonarr";
delete = false;
};
};
}