nixos-config/nixos/machines/robi/borg.nix

31 lines
706 B
Nix
Raw Normal View History

2021-12-28 16:19:29 +01:00
{ lib, config, pkgs, ... }: {
2022-02-01 16:20:41 +01:00
services.borgbackup.repos = {
default = {
quota = "300G";
allowSubRepos = true;
authorizedKeys = [
(lib.fileContents ../../assets/ssh/borg_access.pub)
2022-09-23 20:29:18 +02:00
(lib.fileContents ../../assets/ssh/palo_rsa.pub)
2022-02-01 16:20:41 +01:00
];
};
};
2021-12-28 16:19:29 +01:00
# mirror backup folder to /media
2022-01-17 11:57:52 +01:00
#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" ];
#};
2021-12-28 16:19:29 +01:00
}