feat(eientei): add replication service
This commit is contained in:
parent
054dda07a7
commit
8eedcbf3c2
1 changed files with 43 additions and 0 deletions
43
spec/eientei/replication.nix
Normal file
43
spec/eientei/replication.nix
Normal file
|
@ -0,0 +1,43 @@
|
||||||
|
{
|
||||||
|
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" ];
|
||||||
|
}
|
Loading…
Add table
Add a link
Reference in a new issue