about summary refs log tree commit diff
path: root/nixos
diff options
context:
space:
mode:
authorAlexander Sieg <alex@xanderio.de>2023-05-16 14:55:33 +0200
committerAlexander Sieg <alex@xanderio.de>2023-05-23 10:44:02 +0200
commit74bc42615c1ebb79fea3b4ea614f2fbc4754f62d (patch)
tree05a636acbbcec185bdb630f17c3c174f95751247 /nixos
parent8f13c7d6d718e8aa25fef5ba00e901f9c2d6b48f (diff)
downloadnixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar.gz
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar.bz2
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar.lz
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar.xz
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.tar.zst
nixlib-74bc42615c1ebb79fea3b4ea614f2fbc4754f62d.zip
outline: 0.68.1 -> 0.69.2
Diffstat (limited to 'nixos')
-rw-r--r--nixos/modules/services/web-apps/outline.nix19
1 files changed, 6 insertions, 13 deletions
diff --git a/nixos/modules/services/web-apps/outline.nix b/nixos/modules/services/web-apps/outline.nix
index b72dd8243bb4..6f63198a68a5 100644
--- a/nixos/modules/services/web-apps/outline.nix
+++ b/nixos/modules/services/web-apps/outline.nix
@@ -586,7 +586,7 @@ in
 
       # Create an outline-sequalize wrapper (a wrapper around the wrapper) that
       # has the config file's path baked in. This is necessary because there is
-      # at least one occurrence of outline calling this from its own code.
+      # at least two occurrences of outline calling this from its own code.
       sequelize = pkgs.writeShellScriptBin "outline-sequelize" ''
         exec ${cfg.package}/bin/outline-sequelize \
           --config $RUNTIME_DIRECTORY/database.json \
@@ -687,21 +687,18 @@ in
           openssl rand -hex 32 > ${lib.escapeShellArg cfg.utilsSecretFile}
         fi
 
-        # The config file is required for the CLI, the DATABASE_URL environment
-        # variable is read by the app.
+        # The config file is required for the sequelize CLI.
         ${if (cfg.databaseUrl == "local") then ''
           cat <<EOF > $RUNTIME_DIRECTORY/database.json
           {
-            "production": {
-              "dialect": "postgres",
+            "production-ssl-disabled": {
               "host": "/run/postgresql",
               "username": null,
-              "password": null
+              "password": null,
+              "dialect": "postgres"
             }
           }
           EOF
-          export DATABASE_URL=${lib.escapeShellArg localPostgresqlUrl}
-          export PGSSLMODE=disable
         '' else ''
           cat <<EOF > $RUNTIME_DIRECTORY/database.json
           {
@@ -720,11 +717,7 @@ in
             }
           }
           EOF
-          export DATABASE_URL=${lib.escapeShellArg cfg.databaseUrl}
         ''}
-
-        cd $RUNTIME_DIRECTORY
-        ${sequelize}/bin/outline-sequelize db:migrate
       '';
 
       script = ''
@@ -781,7 +774,7 @@ in
         RuntimeDirectoryMode = "0750";
         # This working directory is required to find stuff like the set of
         # onboarding files:
-        WorkingDirectory = "${cfg.package}/share/outline/build";
+        WorkingDirectory = "${cfg.package}/share/outline";
       };
     };
   };