Added modules/borgbackup and enabled on all machines
This commit is contained in:
parent
d989369b52
commit
5039769d31
35
modules/borgbackup.nix
Normal file
35
modules/borgbackup.nix
Normal 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";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
}
|
|
@ -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
|
||||||
];
|
];
|
||||||
|
|
Loading…
Reference in a new issue