Set up backups of /home

This commit is contained in:
Natsu Kagami 2023-09-03 19:28:22 +02:00
parent 4b73906053
commit 2fe1f8ab14
Signed by: nki
GPG key ID: 55A032EB38B49ADB

View file

@ -58,6 +58,19 @@
nki.services.edns.enable = true; nki.services.edns.enable = true;
nki.services.edns.ipv6 = true; nki.services.edns.ipv6 = true;
# Backup home
services.btrbk.extraPackages = with pkgs; [ sudo ];
services.btrbk.instances.home = {
onCalendar = "hourly";
settings = {
snapshot_preserve = "24h 30d 6m 1y";
snapshot_preserve_min = "7d";
volume."/" = {
subvolume.home.snapshot_name = ".backups-home";
};
};
};
# Secrets # Secrets
# sops.defaultSopsFile = ./secrets.yaml; # sops.defaultSopsFile = ./secrets.yaml;
# sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ]; # sops.age.sshKeyPaths = [ "/etc/ssh/ssh_host_ed25519_key" ];