added basic borg backup

This commit is contained in:
mc-fucker 2021-12-24 18:27:19 +01:00
parent e0c105b806
commit 956458f2a9
4 changed files with 27 additions and 0 deletions

24
modules/borg.nix Normal file
View file

@ -0,0 +1,24 @@
{ config, ... }:
{
services.borgbackup.jobs.default = {
paths = [
"/etc"
"/home"
"/root"
"/var"
];
exclude = [
"*/.cache"
"/home/*/build"
"/var/log"
];
repo = "borg@haus.mc-fucker.cool:/mnt/sdf1/borg/${config.networking.hostName}";
compression = "zstd";
encryption.mode = "none";
environment.BORG_RSH = "ssh -o 'StrictHostKeyChecking=no' -i /root/.ssh/id_borg";
extraCreateArgs = "--verbose --stats";
startAt = "03:00";
};
}
# vim: set et ts=2 sw=2 ai:

View file

@ -13,6 +13,7 @@
./hardware-configuration.nix
./modules/generic.nix
./modules/invidious.nix
./modules/borg.nix
];
#nixpkgs.overlays = [

View file

@ -5,6 +5,7 @@
./hardware-configuration.nix
./modules/generic.nix
./modules/ceph-common.nix
./modules/borg.nix
];
services.ceph = {

View file

@ -6,6 +6,7 @@
./modules/generic.nix
./modules/headscale.nix
./modules/ceph-common.nix
./modules/borg.nix
];
services.ceph = {