···126 </listitem>
127 <listitem>
128 <para>
0000000129 <link xlink:href="https://dragonflydb.io/">dragonflydb</link>,
130 a modern replacement for Redis and Memcached. Available as
131 <link linkend="opt-services.dragonflydb.enable">services.dragonflydb</link>.
···126 </listitem>
127 <listitem>
128 <para>
129+ <link xlink:href="https://github.com/mozilla-services/syncstorage-rs">syncstorage-rs</link>,
130+ a self-hostable sync server for Firefox. Available as
131+ <link xlink:href="options.html#opt-services.firefox-syncserver.enable">services.firefox-syncserver</link>.
132+ </para>
133+ </listitem>
134+ <listitem>
135+ <para>
136 <link xlink:href="https://dragonflydb.io/">dragonflydb</link>,
137 a modern replacement for Redis and Memcached. Available as
138 <link linkend="opt-services.dragonflydb.enable">services.dragonflydb</link>.
+1
nixos/doc/manual/release-notes/rl-2211.section.md
···55## New Services {#sec-release-22.11-new-services}
5657- [appvm](https://github.com/jollheef/appvm), Nix based app VMs. Available as [virtualisation.appvm](options.html#opt-virtualisation.appvm.enable).
05859- [dragonflydb](https://dragonflydb.io/), a modern replacement for Redis and Memcached. Available as [services.dragonflydb](#opt-services.dragonflydb.enable).
60
···55## New Services {#sec-release-22.11-new-services}
5657- [appvm](https://github.com/jollheef/appvm), Nix based app VMs. Available as [virtualisation.appvm](options.html#opt-virtualisation.appvm.enable).
58+- [syncstorage-rs](https://github.com/mozilla-services/syncstorage-rs), a self-hostable sync server for Firefox. Available as [services.firefox-syncserver](options.html#opt-services.firefox-syncserver.enable).
5960- [dragonflydb](https://dragonflydb.io/), a modern replacement for Redis and Memcached. Available as [services.dragonflydb](#opt-services.dragonflydb.enable).
61
···1+# Firefox Sync server {#module-services-firefox-syncserver}
2+3+A storage server for Firefox Sync that you can easily host yourself.
4+5+## Quickstart {#module-services-firefox-syncserver-quickstart}
6+7+The absolute minimal configuration for the sync server looks like this:
8+9+```nix
10+services.mysql.package = pkgs.mariadb;
11+12+services.firefox-syncserver = {
13+ enable = true;
14+ secrets = builtins.toFile "sync-secrets" ''
15+ SYNC_MASTER_SECRET=this-secret-is-actually-leaked-to-/nix/store
16+ '';
17+ singleNode = {
18+ enable = true;
19+ hostname = "localhost";
20+ url = "http://localhost:5000";
21+ };
22+};
23+```
24+25+This will start a sync server that is only accessible locally. Once the services is
26+running you can navigate to `about:config` in your Firefox profile and set
27+`identity.sync.tokenserver.uri` to `http://localhost:5000/1.0/sync/1.5`. Your browser
28+will now use your local sync server for data storage.
29+30+::: {.warning}
31+This configuration should never be used in production. It is not encrypted and
32+stores its secrets in a world-readable location.
33+:::
34+35+## More detailed setup {#module-services-firefox-syncserver-configuration}
36+37+The `firefox-syncserver` service provides a number of options to make setting up
38+small deployment easier. These are grouped under the `singleNode` element of the
39+option tree and allow simple configuration of the most important parameters.
40+41+Single node setup is split into two kinds of options: those that affect the sync
42+server itself, and those that affect its surroundings. Options that affect the
43+sync server are `capacity`, which configures how many accounts may be active on
44+this instance, and `url`, which holds the URL under which the sync server can be
45+accessed. The `url` can be configured automatically when using nginx.
46+47+Options that affect the surroundings of the sync server are `enableNginx`,
48+`enableTLS` and `hostnam`. If `enableNginx` is set the sync server module will
49+automatically add an nginx virtual host to the system using `hostname` as the
50+domain and set `url` accordingly. If `enableTLS` is set the module will also
51+enable ACME certificates on the new virtual host and force all connections to
52+be made via TLS.
53+54+For actual deployment it is also recommended to store the `secrets` file in a
55+secure location.
···1+<chapter xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xml:id="module-services-firefox-syncserver">
2+ <title>Firefox Sync server</title>
3+ <para>
4+ A storage server for Firefox Sync that you can easily host yourself.
5+ </para>
6+ <section xml:id="module-services-firefox-syncserver-quickstart">
7+ <title>Quickstart</title>
8+ <para>
9+ The absolute minimal configuration for the sync server looks like
10+ this:
11+ </para>
12+ <programlisting language="nix">
13+services.mysql.package = pkgs.mariadb;
14+15+services.firefox-syncserver = {
16+ enable = true;
17+ secrets = builtins.toFile "sync-secrets" ''
18+ SYNC_MASTER_SECRET=this-secret-is-actually-leaked-to-/nix/store
19+ '';
20+ singleNode = {
21+ enable = true;
22+ hostname = "localhost";
23+ url = "http://localhost:5000";
24+ };
25+};
26+</programlisting>
27+ <para>
28+ This will start a sync server that is only accessible locally.
29+ Once the services is running you can navigate to
30+ <literal>about:config</literal> in your Firefox profile and set
31+ <literal>identity.sync.tokenserver.uri</literal> to
32+ <literal>http://localhost:5000/1.0/sync/1.5</literal>. Your
33+ browser will now use your local sync server for data storage.
34+ </para>
35+ <warning>
36+ <para>
37+ This configuration should never be used in production. It is not
38+ encrypted and stores its secrets in a world-readable location.
39+ </para>
40+ </warning>
41+ </section>
42+ <section xml:id="module-services-firefox-syncserver-configuration">
43+ <title>More detailed setup</title>
44+ <para>
45+ The <literal>firefox-syncserver</literal> service provides a
46+ number of options to make setting up small deployment easier.
47+ These are grouped under the <literal>singleNode</literal> element
48+ of the option tree and allow simple configuration of the most
49+ important parameters.
50+ </para>
51+ <para>
52+ Single node setup is split into two kinds of options: those that
53+ affect the sync server itself, and those that affect its
54+ surroundings. Options that affect the sync server are
55+ <literal>capacity</literal>, which configures how many accounts
56+ may be active on this instance, and <literal>url</literal>, which
57+ holds the URL under which the sync server can be accessed. The
58+ <literal>url</literal> can be configured automatically when using
59+ nginx.
60+ </para>
61+ <para>
62+ Options that affect the surroundings of the sync server are
63+ <literal>enableNginx</literal>, <literal>enableTLS</literal> and
64+ <literal>hostnam</literal>. If <literal>enableNginx</literal> is
65+ set the sync server module will automatically add an nginx virtual
66+ host to the system using <literal>hostname</literal> as the domain
67+ and set <literal>url</literal> accordingly. If
68+ <literal>enableTLS</literal> is set the module will also enable
69+ ACME certificates on the new virtual host and force all
70+ connections to be made via TLS.
71+ </para>
72+ <para>
73+ For actual deployment it is also recommended to store the
74+ <literal>secrets</literal> file in a secure location.
75+ </para>
76+ </section>
77+</chapter>
···1-export HARECACHE="$NIX_BUILD_TOP/.harecache"
2-3addHarepath () {
4 for haredir in third-party stdlib; do
5 if [[ -d "$1/src/hare/$haredir" ]]; then
···001addHarepath () {
2 for haredir in third-party stdlib; do
3 if [[ -d "$1/src/hare/$haredir" ]]; then
···1+diff --git a/tests/test_time/test_time.c b/tests/test_time/test_time.c
2+index 931500b..cde64ad 100644
3+--- a/tests/test_time/test_time.c
4++++ b/tests/test_time/test_time.c
5+@@ -110,7 +110,8 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused)))
6+ /*
7+ * Verify that we did not sleep less than requested (see above).
8+ */
9+- if (delta < NSEC_PER_SEC) {
10++ const solo5_time_t slack = 100000000ULL;
11++ if (delta < NSEC_PER_SEC - slack) {
12+ printf("[%d] ERROR: slept too little (expected at least %llu ns)\n",
13+ iters, (unsigned long long)NSEC_PER_SEC);
14+ failed = true;
15+@@ -120,7 +121,6 @@ int solo5_app_main(const struct solo5_start_info *si __attribute__((unused)))
16+ * Verify that we did not sleep more than requested, within reason
17+ * (scheduling delays, general inaccuracy of the current timing code).
18+ */
19+- const solo5_time_t slack = 100000000ULL;
20+ if (delta > (NSEC_PER_SEC + slack)) {
21+ printf("[%d] ERROR: slept too much (expected at most %llu ns)\n",
22+ iters, (unsigned long long)slack);