nixos-config/nixos/machines/chungus/sync-syncoid.nix

49 lines
1.4 KiB
Nix
Raw Normal View History

2024-05-11 00:20:55 +02:00
{ config, ... }:
2023-08-28 22:53:55 +02:00
{
2024-05-11 00:20:55 +02:00
sops.secrets.syncoid_private_key = {
key = "rsync_private_key";
owner = config.services.syncoid.user;
};
2023-08-28 22:53:55 +02:00
services.syncoid = {
enable = true;
# local
2023-08-28 22:53:55 +02:00
commands.service2 = {
source = "zroot/services2";
2024-03-11 15:33:26 +01:00
target = "zraid/mirror/services2"; # should not be created up front!
};
commands.paperless = {
source = "zroot/paperless";
2024-03-11 15:33:26 +01:00
target = "zraid/mirror/paperless"; # should not be created up front!
};
commands.postgresql = {
source = "zroot/postgresql";
2024-03-11 15:33:26 +01:00
target = "zraid/mirror/postgresql"; # should not be created up front!
2023-08-28 22:53:55 +02:00
};
# remote
commands.matrix-terranix = {
sshKey = config.sops.secrets.syncoid_private_key.path;
source = "root@orbi:zroot/matrix-terranix";
target = "zraid/mirror/matrix-terranix"; # should not be created up front!
};
commands.nextcloud = {
sshKey = config.sops.secrets.syncoid_private_key.path;
source = "root@orbi:zroot/nextcloud";
target = "zraid/mirror/nextcloud"; # should not be created up front!
};
2024-05-11 00:20:55 +02:00
commands.photoprism = {
sshKey = config.sops.secrets.syncoid_private_key.path;
source = "root@orbi:zmedia/photoprism";
target = "zraid/mirror/photoprism"; # should not be created up front!
};
2023-08-28 22:53:55 +02:00
commonArgs = [
# Does not create new snapshot, only transfers existing
2023-08-28 22:53:55 +02:00
"--no-sync-snap"
];
};
}