Skip to content

syncthing

Syncthing is a continuous file synchronization program with automatic peer discovery

Utility
System
Network

Usage

{
      instances.syncthing = {
        roles.peer.tags.all = { };
        roles.peer.settings.folders = {
          documents = {
            path = "~/syncthing/documents";
          };
        };
      };
}

Now the folder ~/syncthing/documents will be shared with all your machines.

Documentation

Extensive documentation is available on the Syncthing website.


Roles

The syncthing module has the following roles:

  • peer

Options for the peer role

extraDevices

External syncthing devices not managed by clan (e.g., mobile phones)

Type: attribute set of (submodule)

Default:

{ }
Example
{
  phone = {
    id = "P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2";
    name = "My Phone";
    addresses = [ "dynamic" ];
  };
}

Declared in: clanServices/syncthing/default.nix

extraDevices.<name>.addresses

List of addresses for the device

Type: list of string

Default:

[
  "dynamic"
]
Example
[
  "dynamic"
  "tcp://192.168.1.100:22000"
]

Declared in: clanServices/syncthing/default.nix

extraDevices.<name>.id

Device ID of the external syncthing device

Type: string

Example
"P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2"

Declared in: clanServices/syncthing/default.nix

extraDevices.<name>.name

Human readable name for the device

Type: string

Default:

""

Declared in: clanServices/syncthing/default.nix

folders

Folders to synchronize between all peers

Type: attribute set of (submodule)

Default:

{ }

Declared in: clanServices/syncthing/default.nix

folders.<name>.devices

List of device names to share this folder with. Empty list means all peers and extraDevices.

Type: list of string

Default:

[ ]

Declared in: clanServices/syncthing/default.nix

folders.<name>.ignorePerms

Ignore permission changes

Type: boolean

Default:

false

Declared in: clanServices/syncthing/default.nix

folders.<name>.path

Path to the folder to sync

Type: string

Declared in: clanServices/syncthing/default.nix

folders.<name>.rescanIntervalS

Rescan interval in seconds

Type: signed integer

Default:

3600

Declared in: clanServices/syncthing/default.nix

folders.<name>.type

Folder type

Type: one of "sendreceive", "sendonly", "receiveonly"

Default:

"sendreceive"

Declared in: clanServices/syncthing/default.nix

folders.<name>.versioning

Versioning configuration

Type: null or (submodule)

Default:

null

Declared in: clanServices/syncthing/default.nix

folders.<name>.versioning.params

Versioning parameters

Type: attribute set of string

Default:

{ }

Declared in: clanServices/syncthing/default.nix

folders.<name>.versioning.type

Versioning type

Type: one of "external", "simple", "staggered", "trashcan"

Declared in: clanServices/syncthing/default.nix

openDefaultPorts

Whether to open the default syncthing ports in the firewall.

Type: boolean

Default:

true

Declared in: clanServices/syncthing/default.nix