diff --git a/options.xhtml b/options.xhtml index 9739e8d7b..d19f2a35a 100644 --- a/options.xhtml +++ b/options.xhtml @@ -73950,7 +73950,9 @@ attribute set of (null or string or path)

-

Whether to enable Syncthing continuous file synchronization.

+

Whether to enable Syncthing, a self-hosted open-source alternative to Dropbox and Bittorrent Sync. +Further declarative configuration options only supported on Linux devices. +.

Type: boolean

@@ -73961,6 +73963,85 @@ boolean

Example: true

+

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.package + + +
+
+

The syncthing package to use.

+ +

Type: +package

+ +

Default: +pkgs.syncthing

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

@@ -73977,7 +74058,7 @@ boolean

-

Extra command-line arguments to pass to syncthing.

+

Extra command-line arguments to pass to syncthing

Type: list of string

@@ -73986,10 +74067,765 @@ list of string

[ ]

Example:

[
-  "--gui-apikey=apiKey"
+  "--reset-deltas"
 ]
 
+

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.guiAddress + + +
+
+

The address to serve the web interface at.

+ +

Type: +string

+ +

Default: +"127.0.0.1:8384"

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.passwordFile + + +
+
+

Path to the gui password file.

+ +

Type: +null or path

+ +

Default: +null

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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: +JSON value

+ +

Default: +{ }

+ +

Example:

{
+  gui = {
+    theme = "black";
+  };
+  options = {
+    localAnnounceEnabled = false;
+  };
+}
+
+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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 (JSON value)

+ +

Default: +{ }

+ +

Example:

{
+  bigbox = {
+    addresses = [
+      "tcp://192.168.0.10:51820"
+    ];
+    id = "7CFNTQM-IMTJBHJ-3UWRDIU-ZGQJFR6-VCXZ3NB-XUH3KZO-N52ITXR-LAIYUAU";
+  };
+}
+
+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.devices.<name>.id + + +
+
+

The device ID. See https://docs.syncthing.net/dev/device-ids.html.

+ +

Type: +string

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.devices.<name>.name + + +
+
+

The name of the device.

+ +

Type: +string

+ +

Default: +"‹name›"

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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 (JSON value)

+ +

Default: +{ }

+ +

Example:

{
+  "/home/user/sync" = {
+    id = "syncme";
+    devices = [ "bigbox" ];
+  };
+}
+
+
+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.folders.<name>.devices + + +
+
+

The devices this folder should be shared with. Each device must +be defined in the devices option.

+ +

Type: +list of string

+ +

Default: +[ ]

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.folders.<name>.id + + +
+
+

The ID of the folder. Must be the same on all devices.

+ +

Type: +string

+ +

Default: +"‹name›"

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.folders.<name>.label + + +
+
+

The label of the folder.

+ +

Type: +string

+ +

Default: +"‹name›"

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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 (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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + services.syncthing.settings.options + + +
+
+

The options element contains all other global configuration options

+ +

Type: +JSON value

+ +

Default: +{ }

+ +

Declared by:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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:

+ + +
+ +<home-manager/modules/services/syncthing.nix> + +
+
+
+ + 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: