66 lines
1.9 KiB
Nix
66 lines
1.9 KiB
Nix
{
|
|
pkgs,
|
|
config,
|
|
factsGenerator,
|
|
...
|
|
}:
|
|
let
|
|
tld = config.clan.static-hosts.topLevelDomain;
|
|
in
|
|
{
|
|
|
|
clan.core.facts.services.syncoid = factsGenerator.ssh { name = "syncoid"; };
|
|
systemd.tmpfiles.settings.syncoid = {
|
|
"/run/facts/ssh.syncoid.id_ed25519"."C+" = {
|
|
user = config.services.syncoid.user;
|
|
group = config.services.syncoid.group;
|
|
mode = "400";
|
|
argument = config.clan.core.facts.services.syncoid.secret."ssh.syncoid.id_ed25519".path;
|
|
};
|
|
};
|
|
|
|
services.syncoid = {
|
|
enable = true;
|
|
|
|
# local
|
|
commands.service2 = {
|
|
source = "zroot/services2";
|
|
target = "zraid/mirror/services2"; # should NOT be created up front!
|
|
};
|
|
commands.paperless = {
|
|
source = "zroot/paperless";
|
|
target = "zraid/mirror/paperless"; # should NOT be created up front!
|
|
};
|
|
commands.postgresql = {
|
|
source = "zroot/postgresql";
|
|
target = "zraid/mirror/postgresql"; # should NOT be created up front!
|
|
};
|
|
|
|
# remote
|
|
commands.matrix-terranix = {
|
|
sshKey = "/run/facts/ssh.syncoid.id_ed25519";
|
|
source = "root@orbi.${tld}:zroot/matrix-terranix";
|
|
target = "zraid/mirror/matrix-terranix"; # should NOT be created up front!
|
|
};
|
|
commands.nextcloud = {
|
|
sshKey = "/run/facts/ssh.syncoid.id_ed25519";
|
|
source = "root@orbi.${tld}:zroot/nextcloud";
|
|
target = "zraid/mirror/nextcloud"; # should NOT be created up front!
|
|
};
|
|
commands.photoprism = {
|
|
sshKey = "/run/facts/ssh.syncoid.id_ed25519";
|
|
source = "root@orbi.${tld}:zmedia/photoprism";
|
|
target = "zraid/mirror/photoprism"; # should NOT be created up front!
|
|
};
|
|
commands.taskchampion = {
|
|
sshKey = "/run/facts/ssh.syncoid.id_ed25519";
|
|
source = "root@orbi.${tld}:zroot/taskchampion";
|
|
target = "zraid/mirror/taskchampion"; # should NOT be created up front!
|
|
};
|
|
commonArgs = [
|
|
# Does not create new snapshot, only transfers existing
|
|
"--no-sync-snap"
|
|
];
|
|
};
|
|
|
|
}
|