]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/tools/tools/wallabag.nix
Add specification for the private config file as a module.
[perso/Immae/Config/Nix.git] / modules / private / websites / tools / tools / wallabag.nix
index d6e588285e19eaa4159d633237d04afdcca439ac..2d152b2c25ece9a00deb043367f358d987e2f2dc 100644 (file)
@@ -1,5 +1,8 @@
-{ env, wallabag }:
+{ env, wallabag, mylibs }:
 rec {
+  backups = {
+    rootDir = varDir;
+  };
   varDir = "/var/lib/wallabag";
   keys = [{
     dest = "webapps/tools-wallabag";
@@ -45,16 +48,16 @@ rec {
           redis_password: null
           sites_credentials: {  }
           ldap_enabled: true
-          ldap_host: ldap.immae.eu
+          ldap_host: ${env.ldap.host}
           ldap_port: 636
           ldap_tls: false
           ldap_ssl: true
           ldap_bind_requires_dn: true
-          ldap_base: 'dc=immae,dc=eu'
-          ldap_manager_dn: 'cn=wallabag,ou=services,dc=immae,dc=eu'
+          ldap_base: '${env.ldap.base}'
+          ldap_manager_dn: '${env.ldap.dn}'
           ldap_manager_pw: ${env.ldap.password}
-          ldap_filter: '(&(memberOf=cn=users,cn=wallabag,ou=services,dc=immae,dc=eu))'
-          ldap_admin_filter: '(&(memberOf=cn=admins,cn=wallabag,ou=services,dc=immae,dc=eu)(uid=%s))'
+          ldap_filter: '${env.ldap.filter}'
+          ldap_admin_filter: '${env.ldap.admin_filter}'
           ldap_username_attribute: uid
           ldap_email_attribute: mail
           ldap_name_attribute: cn
@@ -123,7 +126,7 @@ rec {
         echo -n "${webappDir}" > ${varDir}/currentWebappDir
         sha512sum /var/secrets/webapps/tools-wallabag > ${varDir}/currentKey
       fi
-      '';
+    '';
     serviceDeps = [ "postgresql.service" "openldap.service" ];
     basedir = builtins.concatStringsSep ":" [ webappDir "/var/secrets/webapps/tools-wallabag" varDir ];
     socket = "/var/run/phpfpm/wallabag.sock";