nixos/spec/eientei/replication.nix

44 lines
948 B
Nix

{
services.syncoid = {
enable = true;
interval = "daily";
sshKey = "/var/lib/syncoid/.ssh/id_ed25519";
commonArgs = [
"--recursive"
#"--use-hold"
"--compress=lz4"
"--mbuffer-size=128M"
];
localSourceAllow = [
"bookmark"
"hold"
"send"
"snapshot"
"destroy"
"mount"
];
commands = let
sendOptions = "w";
remote = "koishi@archive:archive/backup/koishi/eientei";
in {
"eientei/persist" = {
inherit sendOptions;
target = "${remote}/persist";
};
"eientei/service" = {
inherit sendOptions;
target = "${remote}/service";
};
"eientei/storage" = {
inherit sendOptions;
target = "${remote}/storage";
};
};
};
users.users.syncoid.uid = 82;
users.groups.syncoid.gid = 82;
environment.persistence."/nix/persist/fhs".directories = [ "/var/lib/syncoid" ];
}