···182182 <literal>lib.mkOverride</literal> can be used.
183183 </para>
184184 </listitem>
185185+ <listitem>
186186+ <para>
187187+ The following changes apply if the <literal>stateVersion</literal> is changed to 18.03 or higher.
188188+ For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
189189+ </para>
190190+ <itemizedlist>
191191+ <listitem>
192192+ <para>
193193+ <literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
194194+ Migration instructions can be found <link xlink:href="https://github.com/matrix-org/synapse/blob/master/docs/postgres.rst#porting-from-sqlite"> here </link>.
195195+ </para>
196196+ </listitem>
197197+ </itemizedlist>
198198+ </listitem>
185199</itemizedlist>
186200187201</section>
+3-1
nixos/modules/services/misc/matrix-synapse.nix
···341341 };
342342 database_type = mkOption {
343343 type = types.enum [ "sqlite3" "psycopg2" ];
344344- default = "sqlite3";
344344+ default = if versionAtLeast config.system.stateVersion "18.03"
345345+ then "psycopg2"
346346+ else "sqlite3";
345347 description = ''
346348 The database engine name. Can be sqlite or psycopg2.
347349 '';