summary refs log tree commit diff
path: root/mixins/syncthing.nix
blob: ac9944b93b83a0409663a9154ac98c7f3bc84e53 (plain)
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
{
  pkgs,
  config,
  ...
}: {
  config = {
    services.syncthing = {
      enable = true;
      user = "tzlil";
      dataDir = "/home/tzlil/sync";
      configDir = "/home/tzlil/.config/syncthing";
      overrideDevices = true;
      overrideFolders = true;
      settings = {
        devices = {
          "phone".id = "UHWVTEZ-BERNFCH-3ZXQHNE-ZRBHLU6-MBAVEHB-TKLQJM7-ZGHLJ4R-6E4SAA7";
        };
        folders = {
          "passwords" = {
            path = "/home/tzlil/sync/passwords";
            devices = ["phone"];
          };
        };
      };
    };

    environment.persistence."/nix/persist".users.tzlil.directories = [
      "sync"
      ".config/syncthing"
    ];
  };
}