Added modules/borgbackup and enabled on all machines

This commit is contained in:
fleaz 2022-05-11 13:46:39 +02:00
parent d989369b52
commit 5039769d31
No known key found for this signature in database
GPG key ID: AED15F8FDD04D083
2 changed files with 36 additions and 0 deletions

35
modules/borgbackup.nix Normal file
View file

@ -0,0 +1,35 @@
{config,...}:
{
programs.ssh.knownHosts = {
"borg.cysec.de" = { publicKey = "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIOwKHZZiJ/GgDmAbO2VdGNJIcBQKnFQNXBBzyrsK+ZE0"; };
};
services.borgbackup.jobs = {
home = {
paths = "/home";
exclude = [
"/home/fleaz/.cache"
"/home/fleaz/Downloads"
"/home/fleaz/VirtualBox VMs"
"/home/fleaz/repos"
"/home/fleaz/.config/Code"
"/home/fleaz/.config/Element"
"/home/fleaz/.config/Signal"
"/home/fleaz/.config/chromium"
"/home/fleaz/.config/discord"
"/home/fleaz/.thunderbird"
"/home/fleaz/.mozilla"
"/home/fleaz/.vscode"
];
extraCreateArgs = "--stats";
repo = "fleaz@borg.cysec.de:${config.networking.hostName}";
environment = { BORG_RSH = "ssh -i /home/fleaz/.ssh/id_borgbackup"; };
encryption = {
mode = "repokey-blake2";
passCommand = "cat /etc/secrets/borgbackup.txt";
};
compression = "auto,zstd";
startAt = "hourly";
};
};
}

View file

@ -12,6 +12,7 @@
../modules/steam.nix ../modules/steam.nix
# ../modules/via.nix broken # ../modules/via.nix broken
../modules/virtualbox.nix ../modules/virtualbox.nix
../modules/borgbackup.nix
#../secrets/remote-builder.nix #../secrets/remote-builder.nix
../users/fleaz.nix ../users/fleaz.nix
]; ];