Skip to content

Firefox syncserver

services.firefox-syncserver.database.createLocally

Whether to create database and user on the local machine if they do not exist. This includes enabling unix domain socket authentication for the configured user.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.database.host

Database host name. localhost is treated specially and inserts systemd dependencies, other hostnames or IP addresses of the local machine do not.

Type: string

Default

"localhost"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.database.name

Database to use for storage. Will be created automatically if it does not exist and config.services.firefox-syncserver.database.createLocally is set.

Type: string matching the pattern [a-z_][a-z0-9_]*

Default

"firefox_syncserver"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.database.user

Username for database connections.

Type: string

Default

"firefox-syncserver"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.enable

Whether to enable the Firefox Sync storage service.

Out of the box this will not be very useful unless you also configure at least one service and one nodes by inserting them into the mysql database manually, e.g. by running

  INSERT INTO `services` (`id`, `service`, `pattern`) VALUES ('1', 'sync-1.5', '{node}/1.5/{uid}');
  INSERT INTO `nodes` (`id`, `service`, `node`, `available`, `current_load`,
      `capacity`, `downed`, `backoff`)
    VALUES ('1', '1', 'https://mydomain.tld', '1', '0', '10', '0', '0');

{option}services.firefox-syncserver.singleNode.enable does this automatically when enabled . Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.logLevel

Log level to run with. This can be a simple log level like error or trace, or a more complicated logging expression.

Type: string

Default

"error"

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.package

Package to use.

Type: package

Default

pkgs.syncstorage-rs

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.secrets

A file containing the various secrets. Should be in the format expected by systemd's EnvironmentFile directory. Two secrets are currently available: SYNC_MASTER_SECRET and SYNC_TOKENSERVER__FXA_METRICS_HASH_SECRET.

Type: path

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.settings

Settings for the sync server. These take priority over values computed from NixOS options.

See the example config in https://github.com/mozilla-services/syncstorage-rs/blob/master/config/local.example.toml and the doc comments on the Settings structs in https://github.com/mozilla-services/syncstorage-rs/blob/master/syncstorage-settings/src/lib.rs and https://github.com/mozilla-services/syncstorage-rs/blob/master/tokenserver-settings/src/lib.rs for available options.

Type: TOML value

Default

{ }

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.settings.port

Port to bind to.

Type: 16 bit unsigned integer; between 0 and 65535 (both inclusive)

Default

5000

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.settings.tokenserver.enabled

Whether to enable the token service as well.

Type: boolean

Default

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.capacity

How many sync accounts are allowed on this server. Setting this value equal to or less than the number of currently active accounts will effectively deny service to accounts not yet registered here.

Type: unsigned integer, meaning >=0

Default

10

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.enable

Whether to enable auto-configuration for a simple single-node setup. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.enableNginx

Whether to enable nginx virtualhost definitions. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.enableTLS

Whether to enable automatic TLS setup. Type: boolean

Default

false

Example

true

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.hostname

Host name to use for this service.

Type: string

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix

services.firefox-syncserver.singleNode.url

URL of the host. If you are not using the automatic webserver proxy setup you will have to change this setting or your sync server may not be functional.

Type: string

Default

${if cfg.singleNode.enableTLS then "https" else "http"}://${config.services.firefox-syncserver.singleNode.hostname}

Declared by: https://github.com/nixos/nixpkgs/blob/master/nixos/modules/services/networking/firefox-syncserver.nix