]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - nixops/modules/websites/tools/tools/roundcubemail.nix
Fix rainloop arguments
[perso/Immae/Config/Nix.git] / nixops / modules / websites / tools / tools / roundcubemail.nix
index 38066794adc368c1d50a914a63d98860a94fb142..9939b77508fd56c1927537036bc03117ebf8688d 100644 (file)
@@ -78,11 +78,11 @@ let
         install -m 0750 -o ${apache.user} -g ${apache.group} -d ${varDir}/phpSessions
       '';
     };
-    keys.tools-roundcube = {
-      destDir = "/run/keys/webapps";
+    keys = [{
+      dest = "webapps/tools-roundcube";
       user = apache.user;
       group = apache.group;
-      permissions = "0700";
+      permissions = "0400";
       text = ''
         <?php
           $config['db_dsnw'] = '${env.psql_url}';
@@ -136,7 +136,7 @@ let
           $config['temp_dir'] = '${varDir}/cache';
           $config['mime_types'] = '${apacheHttpd}/conf/mime.types';
       '';
-    };
+    }];
     webRoot = stdenv.mkDerivation rec {
       version = "1.4-rc1";
       name = "roundcubemail-${version}";
@@ -154,7 +154,7 @@ let
       '';
       installPhase = ''
         cp -a . $out
-        ln -s /run/keys/webapps/tools-roundcube $out/config/config.inc.php
+        ln -s /var/secrets/webapps/tools-roundcube $out/config/config.inc.php
         ${builtins.concatStringsSep "\n" (
           lib.attrsets.mapAttrsToList (name: value: "ln -sf ${value} $out/plugins/${name}") plugins
         )}
@@ -184,9 +184,9 @@ let
         '';
     };
     phpFpm = rec {
-      serviceDeps = [ "postgresql.service" "tools-roundcube-key.service" ];
+      serviceDeps = [ "postgresql.service" ];
       basedir = builtins.concatStringsSep ":" (
-        [ webRoot "/run/keys/webapps/tools-roundcube" varDir ]
+        [ webRoot "/var/secrets/webapps/tools-roundcube" varDir ]
         ++ lib.attrsets.mapAttrsToList (name: value: value) plugins
         ++ lib.attrsets.mapAttrsToList (name: value: value) skins);
       phpConfig = ''