services.syncthing.enable
Whether to enable Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync. .
Type: boolean
Default:
false
Example:
true
Declared by:
services.syncthing.package
The syncthing package to use.
Type: package
Default:
pkgs.syncthing
Declared by:
services.syncthing.allProxy
Overwrites the all_proxy environment variable for the Syncthing
process to the given value. This is normally used to let Syncthing
connect through a SOCKS5 proxy server. See
https://docs.syncthing.net/users/proxying.html.
Type: null or string
Default:
null
Example:
"socks5://address.com:1234"
Declared by:
services.syncthing.cert
Path to the cert.pem file, which will be copied into Syncthing’s
config directory.
Type: null or string
Default:
null
Declared by:
services.syncthing.extraOptions
Extra command-line arguments to pass to syncthing
Type: list of string
Default:
[ ]
Example:
[
"--reset-deltas"
]
Declared by:
services.syncthing.guiAddress
The address to serve the web interface at.
Type: string
Default:
"127.0.0.1:8384"
Declared by:
services.syncthing.guiCredentials
Credentials to use for access to the Syncthing GUI. Configuring these is recommended, as otherwise any user with access to the GUI web address – which would typically include all local accounts on your system – will effectively have read/write access to the filesystem with your permissions.
Type: null or (submodule)
Default:
null
Declared by:
services.syncthing.guiCredentials.passwordFile
The full path to a file that contains the password, or a hash of the password, to set for GUI access.
The password file is read each time Syncthing is started.
If the password file contains a bcrypt hash, Syncthing will use that hash as-is. Otherwise, Syncthing will hash the password provided before storing it.
Type: string
Default:
null
Example:
config.sops.secrets.syncthing.path
Declared by:
services.syncthing.guiCredentials.username
Username to use to log into the Syncthing GUI.
Type: non-empty string
Example:
config.home.username
Declared by:
services.syncthing.key
Path to the key.pem file, which will be copied into Syncthing’s
config directory.
Type: null or string
Default:
null
Declared by:
services.syncthing.overrideDevices
Whether to delete the devices which are not configured via the
devices option.
If set to false, devices added via the web
interface will persist and will have to be deleted manually.
Type: boolean
Default:
true
Declared by:
services.syncthing.overrideFolders
Whether to delete the folders which are not configured via the
folders option.
If set to false, folders added via the web
interface will persist and will have to be deleted manually.
Type: boolean
Default:
true
Declared by:
services.syncthing.settings
Extra configuration options for Syncthing. See https://docs.syncthing.net/users/config.html. Note that this attribute set does not exactly match the documented XML format. Instead, this is the format of the JSON REST API. There are slight differences. For example, this XML:
<options>
<listenAddress>default</listenAddress>
<minHomeDiskFree unit="%">1</minHomeDiskFree>
</options>
corresponds to the Nix code:
{
options = {
listenAddresses = [
"default"
];
minHomeDiskFree = {
unit = "%";
value = 1;
};
};
}
Type: open submodule of (JSON value)
Default:
{ }
Example:
{
gui = {
theme = "black";
};
options = {
localAnnounceEnabled = false;
};
}
Declared by:
services.syncthing.settings.devices
Peers/devices which Syncthing should communicate with.
Note that you can still add devices manually, but those changes will be reverted on restart if overrideDevices is enabled.
Type: attribute set of (open submodule of (JSON value))
Default:
{ }
Example:
{
bigbox = {
addresses = [
"tcp://192.168.0.10:51820"
];
id = "7CFNTQM-IMTJBHJ-3UWRDIU-ZGQJFR6-VCXZ3NB-XUH3KZO-N52ITXR-LAIYUAU";
};
}
Declared by:
services.syncthing.settings.devices.<name>.autoAcceptFolders
Automatically create or share folders that this device advertises at the default path. See https://docs.syncthing.net/users/config.html?highlight=autoaccept#config-file-format.
Type: boolean
Default:
false
Declared by:
services.syncthing.settings.devices.<name>.id
The device ID. See https://docs.syncthing.net/dev/device-ids.html.
Type: string
Declared by:
services.syncthing.settings.devices.<name>.name
The name of the device.
Type: string
Default:
"‹name›"
Declared by:
services.syncthing.settings.folders
Folders which should be shared by Syncthing.
Note that you can still add folders manually, but those changes will be reverted on restart if overrideFolders is enabled.
Type: attribute set of (open submodule of (JSON value))
Default:
{ }
Example:
{
"/home/user/sync" = {
devices = [
"bigbox"
];
id = "syncme";
};
}
Declared by:
services.syncthing.settings.folders.<name>.enable
Whether to share this folder. This option is useful when you want to define all folders in one place, but not every machine should share all folders.
Type: boolean
Default:
true
Declared by:
services.syncthing.settings.folders.<name>.copyOwnershipFromParent
On Unix systems, tries to copy file/folder ownership from the parent directory (the directory it’s located in). Requires running Syncthing as a privileged user, or granting it additional capabilities (e.g. CAP_CHOWN on Linux).
Type: boolean
Default:
false
Declared by:
services.syncthing.settings.folders.<name>.devices
The devices this folder should be shared with. Each device must be defined in the devices option.
A list of either strings or attribute sets, where values are device names or device configurations.
Type: list of (string or (open submodule of (JSON value)))
Default:
[ ]
Declared by:
services.syncthing.settings.folders.<name>.id
The ID of the folder. Must be the same on all devices.
Type: string
Default:
"‹name›"
Declared by:
services.syncthing.settings.folders.<name>.label
The label of the folder.
Type: string
Default:
"‹name›"
Declared by:
services.syncthing.settings.folders.<name>.path
The path to the folder which should be shared.
Only absolute paths (starting with /) and paths relative to
the user’s home directory (starting with ~/) are allowed.
Type: string starting with / or ~/
Default:
"‹name›"
Declared by:
services.syncthing.settings.folders.<name>.type
Controls how the folder is handled by Syncthing. See https://docs.syncthing.net/users/config.html#config-option-folder.type.
Type: one of “sendreceive”, “sendonly”, “receiveonly”, “receiveencrypted”
Default:
"sendreceive"
Declared by:
services.syncthing.settings.folders.<name>.versioning
How to keep changed/deleted files with Syncthing. There are 4 different types of versioning with different parameters. See https://docs.syncthing.net/users/versioning.html.
Type: null or (open submodule of (JSON value))
Default:
null
Example:
[
{
versioning = {
type = "simple";
params.keep = "10";
};
}
{
versioning = {
type = "trashcan";
params.cleanoutDays = "1000";
};
}
{
versioning = {
type = "staggered";
fsPath = "/syncthing/backup";
params = {
cleanInterval = "3600";
maxAge = "31536000";
};
};
}
{
versioning = {
type = "external";
params.versionsPath = pkgs.writers.writeBash "backup" ''
folderpath="$1"
filepath="$2"
rm -rf "$folderpath/$filepath"
'';
};
}
]
Declared by:
services.syncthing.settings.folders.<name>.versioning.type
The type of versioning. See https://docs.syncthing.net/users/versioning.html.
Type: one of “external”, “simple”, “staggered”, “trashcan”
Declared by:
services.syncthing.settings.options
The options element contains all other global configuration options
Type: open submodule of (JSON value)
Default:
{ }
Declared by:
services.syncthing.settings.options.limitBandwidthInLan
Whether to apply bandwidth limits to devices in the same broadcast domain as the local device.
Type: null or boolean
Default:
null
Declared by:
services.syncthing.settings.options.localAnnounceEnabled
Whether to send announcements to the local LAN, also use such announcements to find other devices.
Type: null or boolean
Default:
null
Declared by:
services.syncthing.settings.options.localAnnouncePort
The port on which to listen and send IPv4 broadcast announcements to.
Type: null or signed integer
Default:
null
Declared by:
services.syncthing.settings.options.maxFolderConcurrency
This option controls how many folders may concurrently be in I/O-intensive operations such as syncing or scanning. The mechanism is described in detail in a separate chapter.
Type: null or signed integer
Default:
null
Declared by:
services.syncthing.settings.options.relaysEnabled
When true, relays will be connected to and potentially used for device to device connections.
Type: null or boolean
Default:
null
Declared by:
services.syncthing.settings.options.urAccepted
Whether the user has accepted to submit anonymous usage data. The default, 0, mean the user has not made a choice, and Syncthing will ask at some point in the future. “-1” means no, a number above zero means that that version of usage reporting has been accepted.
Type: null or signed integer
Default:
null
Declared by:
services.syncthing.tray.enable
Whether to enable a syncthing tray service.
Type: boolean
Default:
false
Declared by:
services.syncthing.tray.package
The syncthingtray package to use.
Type: package
Default:
pkgs.syncthingtray-minimal
Example:
qsyncthingtray
Declared by:
services.syncthing.tray.command
Syncthing tray command to use.
Type: string
Default:
syncthingtray --wait
Example:
"qsyncthingtray"
Declared by: