diff options
Diffstat (limited to 'nodes/snorlax/syncoid.nix')
-rw-r--r-- | nodes/snorlax/syncoid.nix | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/nodes/snorlax/syncoid.nix b/nodes/snorlax/syncoid.nix new file mode 100644 index 0000000..435e040 --- /dev/null +++ b/nodes/snorlax/syncoid.nix @@ -0,0 +1,28 @@ +{ config, ... }: +{ + age.secrets.syncoid-key = { + file = ../../secrets/syncoid-key.age; + owner = "syncoid"; + group = "syncoid"; + }; + + + services.sanoid.enable = true; + services.sanoid.datasets = { + "data/safe/persist" = { + autoprune = true; + autosnap = true; + hourly = 24; + daily = 7; + monthly = 1; + yearly = 1; + }; + }; + + services.syncoid.enable = true; + services.syncoid.sshKey = config.age.secrets.syncoid-key.path; + services.syncoid.commonArgs = ["--no-sync-snap"]; + services.syncoid.commands = { + "data/safe/persist".target = "transfer@backup.jras.nl:backup/snorlax"; + }; +} |