about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorDavid McFarland <corngood@gmail.com>2017-11-04 10:11:49 -0300
committerDavid McFarland <corngood@gmail.com>2018-02-04 21:22:55 -0400
commita4b7de74a5a7d1be6698063705e2b01850cfaba1 (patch)
tree7adc6d4f007cbc80784519a8065e387dcf9926ec /nixos
parent1472fa8685706bab65a6807c788604c70094ebb8 (diff)
downloadnixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar.gz
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar.bz2
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar.lz
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar.xz
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.tar.zst
nixlib-a4b7de74a5a7d1be6698063705e2b01850cfaba1.zip
matrix-synapse: default to postgresql on 18.03
Diffstat (limited to 'nixos')
-rw-r--r--nixos/doc/manual/release-notes/rl-1803.xml14
-rw-r--r--nixos/modules/services/misc/matrix-synapse.nix4
2 files changed, 17 insertions, 1 deletions
diff --git a/nixos/doc/manual/release-notes/rl-1803.xml b/nixos/doc/manual/release-notes/rl-1803.xml
index 46cbeb0a158e..8391c550afab 100644
--- a/nixos/doc/manual/release-notes/rl-1803.xml
+++ b/nixos/doc/manual/release-notes/rl-1803.xml
@@ -182,6 +182,20 @@ following incompatible changes:</para>
       <literal>lib.mkOverride</literal> can be used.
     </para>
   </listitem>
+  <listitem>
+    <para>
+      The following changes apply if the <literal>stateVersion</literal> is changed to 18.03 or higher.
+      For <literal>stateVersion = "17.09"</literal> or lower the old behavior is preserved.
+    </para>
+    <itemizedlist>
+      <listitem>
+        <para>
+          <literal>matrix-synapse</literal> uses postgresql by default instead of sqlite.
+          Migration instructions can be found <link xlink:href="https://github.com/matrix-org/synapse/blob/master/docs/postgres.rst#porting-from-sqlite"> here </link>.
+        </para>
+      </listitem>
+    </itemizedlist>
+  </listitem>
 </itemizedlist>
 
 </section>
diff --git a/nixos/modules/services/misc/matrix-synapse.nix b/nixos/modules/services/misc/matrix-synapse.nix
index 33b3b17359c2..b153ebbc98c7 100644
--- a/nixos/modules/services/misc/matrix-synapse.nix
+++ b/nixos/modules/services/misc/matrix-synapse.nix
@@ -341,7 +341,9 @@ in {
       };
       database_type = mkOption {
         type = types.enum [ "sqlite3" "psycopg2" ];
-        default = "sqlite3";
+        default = if versionAtLeast config.system.stateVersion "18.03"
+          then "psycopg2"
+          else "sqlite3";
         description = ''
           The database engine name. Can be sqlite or psycopg2.
         '';