···182 <literal>lib.mkOverride</literal> can be used.
183 </para>
184 </listitem>
00000000000000185</itemizedlist>
186187</section>
···182 <literal>lib.mkOverride</literal> can be used.
183 </para>
184 </listitem>
185+ <listitem>
186+ <para>
187+ The following changes apply if the <literal>stateVersion</literal> is changed to 18.03 or higher.
188+ For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
189+ </para>
190+ <itemizedlist>
191+ <listitem>
192+ <para>
193+ <literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
194+ Migration instructions can be found <link xlink:href="https://github.com/matrix-org/synapse/blob/master/docs/postgres.rst#porting-from-sqlite"> here </link>.
195+ </para>
196+ </listitem>
197+ </itemizedlist>
198+ </listitem>
199</itemizedlist>
200201</section>
+3-1
nixos/modules/services/misc/matrix-synapse.nix
···341 };
342 database_type = mkOption {
343 type = types.enum [ "sqlite3" "psycopg2" ];
344- default = "sqlite3";
00345 description = ''
346 The database engine name. Can be sqlite or psycopg2.
347 '';
···341 };
342 database_type = mkOption {
343 type = types.enum [ "sqlite3" "psycopg2" ];
344+ default = if versionAtLeast config.system.stateVersion "18.03"
345+ then "psycopg2"
346+ else "sqlite3";
347 description = ''
348 The database engine name. Can be sqlite or psycopg2.
349 '';