summary refs log tree commit diff
path: root/mixins/syncthing.nix
blob: 7faf5db2450009d68e7ad0e64e268a00368f1f4f (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
33
34
35
36
37
38
39
40
{
  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".directories = [
      {
        directory = "/home/tzlil/sync";
        user = "tzlil";
        group = "users";
      }
      {
        directory = "/home/tzlil/.config/syncthing";
        user = "tzlil";
        group = "users";
      }
    ];
  };
}