nixos-config/nixos/machines/robi/borg.nix
2022-09-23 20:29:18 +02:00

30 lines
706 B
Nix

{ lib, config, pkgs, ... }: {
services.borgbackup.repos = {
default = {
quota = "300G";
allowSubRepos = true;
authorizedKeys = [
(lib.fileContents ../../assets/ssh/borg_access.pub)
(lib.fileContents ../../assets/ssh/palo_rsa.pub)
];
};
};
# mirror backup folder to /media
#systemd.services.borg-mirror-to-media = {
# enable = true;
# script = ''
# ${pkgs.rsync}/bin/rsync -a \
# /var/lib/borgbackup/ \
# /media/borg-backup-mirror \
# --delete-after
# '';
#};
#systemd.timers.borg-mirror-to-media = {
# enable = true;
# timerConfig.OnCalendar = "daily";
# wantedBy = [ "multi-user.target" ];
#};
}