]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/ether/etherpad_lite.nix
Move etherpad mastodon mediagoblin task and peertube to new secrets
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / ether / etherpad_lite.nix
index 689156e872f84fc057559a636f1a467ff92e5e65..14ad56507ca08cf6bb0e2e0c0b4173bf3e367b0a 100644 (file)
@@ -30,19 +30,19 @@ let
     "ep_subscript_and_superscript"
     "ep_timesliderdiff"
     ];
-  keys = {
-    tools-etherpad-apikey = {
-      destDir = "/run/keys/webapps";
+  keys = [
+    {
+      dest = "webapps/tools-etherpad-apikey";
       permissions = "0400";
       text = env.api_key;
-    };
-    tools-etherpad-sessionkey = {
-      destDir = "/run/keys/webapps";
+    }
+    {
+      dest = "webapps/tools-etherpad-sessionkey";
       permissions = "0400";
       text = env.session_key;
-    };
-    tools-etherpad = {
-      destDir = "/run/keys/webapps";
+    }
+    {
+      dest = "webapps/tools-etherpad";
       permissions = "0400";
       text =
         # Make sure we’re not rebuilding whole libreoffice just because of a
@@ -144,8 +144,8 @@ let
             "logconfig" : { "appenders": [ { "type": "console" } ] }
           }
         '';
-    };
-  };
+    }
+  ];
   webappDir = stdenv.mkDerivation (fetchedGithub ./etherpad-lite.json // rec {
     __noChroot = true;
     patches = [ ./libreoffice_patch.diff ];
@@ -182,8 +182,8 @@ let
       install -t $out/src/ -vDm 644 src/.ep_initialized
       cp -a node_modules $out/
       cp -a src/* $out/src/
-      ln -sf /run/keys/webapps/tools-etherpad-sessionkey $out/SESSIONKEY.txt
-      ln -sf /run/keys/webapps/tools-etherpad-apikey $out/APIKEY.txt
+      ln -sf /var/secrets/webapps/tools-etherpad-sessionkey $out/SESSIONKEY.txt
+      ln -sf /var/secrets/webapps/tools-etherpad-apikey $out/APIKEY.txt
       cp ${jquery} $out/src/static/js/jquery.js
 
       mkdir $out/doc