2023-07-30 19:41:51 +02:00
|
|
|
{ config, pkgs, ... }:
|
|
|
|
{
|
|
|
|
sops.secrets."borg/passphrase" = { };
|
|
|
|
environment.systemPackages = [ pkgs.borgbackup ];
|
|
|
|
services.borgmatic = {
|
|
|
|
enable = true;
|
|
|
|
settings = {
|
2023-10-15 16:30:40 +02:00
|
|
|
source_directories = [
|
|
|
|
"/var/lib"
|
|
|
|
"/var/log"
|
|
|
|
"/nix/persist"
|
|
|
|
"/home"
|
|
|
|
"/etc/secureboot"
|
|
|
|
];
|
2023-07-30 19:41:51 +02:00
|
|
|
|
2023-10-15 16:30:40 +02:00
|
|
|
repositories = [
|
|
|
|
{
|
|
|
|
label = "nuc";
|
2023-11-07 19:56:10 +01:00
|
|
|
path = "ssh://root@192.168.42.2/mnt/backup/thinkpad";
|
2023-10-15 16:30:40 +02:00
|
|
|
}
|
|
|
|
];
|
|
|
|
exclude_patterns = [
|
|
|
|
"/home/*/.cache"
|
|
|
|
"/home/*/.zcomp*"
|
|
|
|
"/home/*/.zcomp*"
|
|
|
|
"/home/*/.gradle*"
|
|
|
|
"/home/*/.java*"
|
|
|
|
"/home/*/.m2*"
|
|
|
|
"/home/*/.wine*"
|
|
|
|
"/home/*/.mypy_cache*"
|
|
|
|
"/home/*/.local/share"
|
|
|
|
"/home/*/.local/share"
|
|
|
|
"/home/*/Linux/Isos"
|
|
|
|
];
|
2023-10-28 15:51:25 +02:00
|
|
|
encryption_passcommand = "${pkgs.coreutils}/bin/cat ${config.sops.secrets."borg/passphrase".path}";
|
|
|
|
compression = "lz4";
|
|
|
|
keep_daily = 7;
|
|
|
|
keep_weekly = 4;
|
|
|
|
keep_monthly = 12;
|
|
|
|
keep_yearly = 3;
|
2023-07-30 19:41:51 +02:00
|
|
|
};
|
|
|
|
};
|
|
|
|
}
|