current
1{
2 den.aspects.services.provides.restic.nixos = {config, ...}: {
3 services.restic.backups."${config.networking.hostName}-backup" = {
4 initialize = true;
5 passwordFile = config.vaultix.secrets.restic-backup-password.path;
6 rcloneConfigFile = config.vaultix.templates."restic-backup-rclone.conf".path;
7 repository = "rclone:Backup:/Backups/${config.networking.hostName}-backup/";
8 paths = [
9 ];
10 exclude = [
11 "tmp"
12 ".git"
13 "cache"
14 ".cache"
15 "*_cache"
16 ];
17 timerConfig = {
18 OnCalendar = "04:00";
19 RandomizedDelaySec = "1h";
20 };
21 pruneOpts = [
22 "--keep-daily 3"
23 "--keep-weekly 3"
24 "--keep-monthly 3"
25 "--keep-yearly 3"
26 ];
27 };
28
29 vaultix.templates."restic-backup-rclone.conf".content = ''
30 [Backup]
31 type = onedrive
32 drive_id = 52CE3DAB18B4C557
33 drive_type = personal
34 token = ${config.vaultix.placeholder.restic-backup-rclone-token}
35 '';
36
37 vaultix.secrets.restic-backup-password.file = ./password.age;
38 vaultix.secrets.restic-backup-rclone-token.file = ./rclone-token.age;
39 };
40}