summaryrefslogtreecommitdiff
path: root/modules/snorlax/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'modules/snorlax/default.nix')
-rw-r--r--modules/snorlax/default.nix27
1 files changed, 26 insertions, 1 deletions
diff --git a/modules/snorlax/default.nix b/modules/snorlax/default.nix
index cbc0430..1817661 100644
--- a/modules/snorlax/default.nix
+++ b/modules/snorlax/default.nix
@@ -1,4 +1,4 @@
-{ ... }:
+{ config, ... }:
{
imports = [
./disk-config.nix
@@ -19,4 +19,29 @@
time.timeZone = "Europe/Amsterdam";
home-manager.users.jras = { home.stateVersion = "24.11"; };
+
+ age.secrets.syncoid-key = {
+ file = ../../secrets/syncoid-key.age;
+ owner = "syncoid";
+ group = "syncoid";
+ };
+
+ services.sanoid.enable = true;
+ services.sanoid.datasets."zroot/persist" = {
+ autoprune = true;
+ autosnap = true;
+ daily = 7;
+ hourly = 24;
+ monthly = 1;
+ yearly = 1;
+ };
+
+ services.syncoid.enable = true;
+ services.syncoid.sshKey = config.age.secrets.syncoid-key.path;
+ services.syncoid.commands = {
+ "zroot/persist" = {
+ source = "zroot/persist";
+ target = "ubuntu@185.107.88.38:backup/snorlax";
+ };
+ };
}