about summary refs log tree commit diff
path: root/hosts/aptos/services.nix
blob: 4e9e8ae64b198764d2a2bf2bfc2e0fbc6ccb4e94 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
{ config, ... }:
let
  secrets = config.age.secrets;
  ssh-key-path = secrets."restic/ssh-key".path;
in
{
  my.services = {
    syncthing.enable = true;
    backup = {
      enable = true;
      repository = "sftp:192.168.6.40:/aptos";
      exclude = [
        # paths that I don't want to backup
        "/home/fcuny/workspace/tmp"

        # various development related files
        "**/target"
        "**/.direnv"
        "**/result"
      ];
      timerConfig = { OnCalendar = "06:30"; };
      passwordFile = secrets."restic/repo-users".path;
      extraOptions = [
        "sftp.command='ssh backup@192.168.6.40 -i ${ssh-key-path} -s sftp'"
      ];
      paths = [
        "/home/fcuny/workspace"
        "/home/fcuny/media"
        "/home/fcuny/documents"
      ];
    };
  };
}