Syncthing is a continuous file synchronization program with automatic peer discovery
<div style="background-color: #F5C3C0; color: white; padding: 10px; border-radius: 20px; text-align: center;">
System
</div>
<div style="background-color: #77DD77; color: white; padding: 10px; border-radius: 20px; text-align: center;">
Network
</div>This service configures Syncthing to continuously synchronize a folder peer-to-peer across your machines.
Example configuration:
{
instances.syncthing = {
roles.peer.tags.all = { };
roles.peer.settings.folders = {
documents = {
path = "/home/youruser/syncthing/documents";
};
};
};
} Notes:
folders is a folder ID (an arbitrary identifier for Syncthing).~ may work in some environments but can be ambiguous in service contexts.See the official Syncthing docs: https://docs.syncthing.net/
The syncthing service has the following roles:
peer roleExternal syncthing devices not managed by clan (e.g., mobile phones)
Type: attribute set of (submodule)
Default:
{ } {
phone = {
id = "P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2";
name = "My Phone";
addresses = [ "dynamic" ];
};
}
Declared in: clanServices/syncthing/default.nix
List of addresses for the device
Type: list of string
Default:
[
"dynamic"
] [
"dynamic"
"tcp://192.168.1.100:22000"
]Declared in: clanServices/syncthing/default.nix
Device ID of the external syncthing device
Type: string
"P56IOI7-MZJNU2Y-IQGDREY-DM2MGTI-MGL3BXN-PQ6W5BM-TBBZ4TJ-XZWICQ2"Declared in: clanServices/syncthing/default.nix
Human readable name for the device
Type: string
Default:
"" Declared in: clanServices/syncthing/default.nix
Folders to synchronize between all peers
Type: attribute set of (submodule)
Default:
{ } Declared in: clanServices/syncthing/default.nix
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
Ignore permission changes
Type: boolean
Default:
false Declared in: clanServices/syncthing/default.nix
Path to the folder to sync
Type: string
Declared in: clanServices/syncthing/default.nix
Rescan interval in seconds
Type: signed integer
Default:
3600 Declared in: clanServices/syncthing/default.nix
Folder type
Type: one of "sendreceive", "sendonly", "receiveonly"
Default:
"sendreceive" Declared in: clanServices/syncthing/default.nix
Versioning configuration
Type: null or (submodule)
Default:
null Declared in: clanServices/syncthing/default.nix
Versioning parameters
Type: attribute set of string
Default:
{ } Declared in: clanServices/syncthing/default.nix
Versioning type
Type: one of "external", "simple", "staggered", "trashcan"
Declared in: clanServices/syncthing/default.nix
Whether to open the default syncthing ports in the firewall.
Type: boolean
Default:
true Declared in: clanServices/syncthing/default.nix