try to add a restic config for servers

This commit is contained in:
Andreas Zweili 2022-01-29 15:31:42 +01:00
parent 6bd0dbb513
commit e49655fb70
3 changed files with 42 additions and 0 deletions

View File

@ -159,6 +159,9 @@
./home-manager/headless.nix
[
./modules/docker
(import ./modules/restic-server-client {
inherit self; time = "03:00";
})
];
plex = mkComputer

View File

@ -0,0 +1,18 @@
{ time, username, ... }:
{
services.restic.backups.${username} = {
user = username;
repository = "rest:http://10.7.89.30:8000";
timerConfig.OnCalendar = time;
passwordFile = "/home/${username}/.nixos/secrets/passwords/restic.key";
paths = [ "/home/${username}/" ];
extraBackupArgs = [
"--exclude-file=/home/${username}/.nixos/modules/restic/excludes.txt"
];
pruneOpts = [
"--keep-daily 7"
"--keep-weekly 5"
"--keep-monthly 12"
];
};
}

View File

@ -0,0 +1,21 @@
/home/*/.gvfs
/home/*/.cache
/home/*/.thumbnails
/home/*/.dropbox
/home/*/.steam
home/*/.local/share/Steam/
/home/*/snap
/proc
/sys
/dev
/etc/mtab
/var/cache
lost+found
/tmp
/var/tmp
__pycache__
/home/*/.local/share/Trash
/home/*/programmes/tor-browser_en-US
/home/*/Downloads
/home/*/git_repos/work
/home/*/VMs