This commit is contained in:
Philipp Hochkamp 2022-04-23 01:38:20 +02:00
parent 33e4c75e19
commit 454665e77d
5 changed files with 22 additions and 9 deletions

View file

@ -19,7 +19,10 @@ in
services.syncthing.enable = true;
services.syncthing.user = "ragon";
services.syncoid.command =
ragon.agenix.secrets."ds9OffsiteBackupSSH" = { owner = config.services.syncoid.user; };
services.syncoid.enable = true;
services.syncoid.sshKey = lib.mkForce "${config.age.secrets.ds9OffsiteBackupSSH.path}";
services.syncoid.commands =
let
datasets = {
backups = "rpool/content/local/backups";
@ -28,7 +31,7 @@ in
hassosvm = "rpool/content/safe/vms/hassos";
};
in
builtins.mapAttrs (n: v: { target = "backup/${n}"; source = v; sendOptions = [ "w" ]; }) datasets;
builtins.mapAttrs (n: v: { target = "backup/${n}"; source = v; sendOptions = "w"; }) datasets;
security.sudo.wheelNeedsPassword = false;
networking.useDHCP = true;

View file

@ -22,7 +22,6 @@
persistent = "rpool/content/safe/persist";
arcSize = 8;
};
services.syncoid.enable = false; # TODO setup offsite backups
services.sanoid.datasets."rpool/content/safe".recursive = true;
services.sanoid.datasets."rpool/content/local/backups" = { };