summaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/core/default.nix7
-rw-r--r--modules/core/packages.nix2
-rw-r--r--modules/snorlax/default.nix27
3 files changed, 35 insertions, 1 deletions
diff --git a/modules/core/default.nix b/modules/core/default.nix
index 2640047..f26e6c7 100644
--- a/modules/core/default.nix
+++ b/modules/core/default.nix
@@ -9,4 +9,11 @@
];
programs.mtr.enable = true;
+
+ programs.ssh.knownHosts = {
+ backup = {
+ extraHostNames = [ "185.107.88.38" ];
+ publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIGr0wvMck97G+g7PY3IaQ12/29Y7B3Me7HDPabMxHoKa";
+ };
+ };
}
diff --git a/modules/core/packages.nix b/modules/core/packages.nix
index 37d1562..16ff140 100644
--- a/modules/core/packages.nix
+++ b/modules/core/packages.nix
@@ -17,5 +17,7 @@
wget
iftop
htop
+
+ nixos-anywhere
];
}
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";
+ };
+ };
}