diff --git a/hosts/jupiter/hardware-configuration.nix b/hosts/jupiter/hardware-configuration.nix index 835a445..71ec6ae 100644 --- a/hosts/jupiter/hardware-configuration.nix +++ b/hosts/jupiter/hardware-configuration.nix @@ -113,6 +113,35 @@ }; }; }; + remote = { + onCalendar = "weekly"; + settings = { + stream_buffer = "265m"; + stream_compress = "lz4"; + incremental = "yes"; + snapshot_create = "no"; + snapshot_dir = "@snapshots"; + timestamp_format = "long"; + + snapshot_preserve_min = "all"; + target_preserve_min = "no"; + target_preserve = "4w 2m"; + archive_preserve_min = "no"; + archive_preserve = "4w 2m"; + + ssh_identity = "/etc/btrbk/ssh/id_ed25519_btrbk_remote"; + ssh_user = "btrbk"; + + volume = { + "ssh://prepaid-big.kabtop.de:2220/mnt/snapshots/root" = { + target = "/mnt/snapshots/Pluto/@snapshots/@kabtop"; + subvolume = { + "@/var" = {}; + }; + }; + }; + }; + }; }; }; diff --git a/hosts/kabtop/hardware-configuration.nix b/hosts/kabtop/hardware-configuration.nix index 157c347..7e68b84 100644 --- a/hosts/kabtop/hardware-configuration.nix +++ b/hosts/kabtop/hardware-configuration.nix @@ -17,9 +17,9 @@ modulesPath, ... }: { - imports = [ - (modulesPath + "/profiles/qemu-guest.nix") - ]; + imports = + [(modulesPath + "/profiles/qemu-guest.nix")] + ++ [(import ../../modules/hardware/backup_remote.nix)]; boot.initrd.availableKernelModules = ["ata_piix" "uhci_hcd" "virtio_pci" "virtio_scsi" "ahci" "sd_mod" "sr_mod"]; boot.initrd.kernelModules = ["vfio_pci" "vfio" "vfio_iommu_type1"]; diff --git a/modules/hardware/backup_remote.nix b/modules/hardware/backup_remote.nix new file mode 100644 index 0000000..a4dc38c --- /dev/null +++ b/modules/hardware/backup_remote.nix @@ -0,0 +1,15 @@ +{ + config, + lib, + pkgs, + ... +}: { + services.btrbk = { + sshAccess = [ + { + key = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIPDqNVyXc6XHJiPakaEyTgeiuOtB1BniZleSdLDLE4ks"; + roles = ["source" "info" "send"]; + } + ]; + }; +}