X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=virtual%2Fmodules%2Fwebsites%2Ftools%2Ftools%2Fwallabag.nix;h=22089dad9da07b8576a195f5bdfb3a74eb55da9b;hb=9d90e7e281e8f4cf9371c17c812a1ac9c08aa66d;hp=0b54fffc6bda17a76cf81927e8534703ea3e26e5;hpb=0f3047a77ee1e0b3d943e39d50301ba85821c572;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/virtual/modules/websites/tools/tools/wallabag.nix b/virtual/modules/websites/tools/tools/wallabag.nix index 0b54fff..22089da 100644 --- a/virtual/modules/websites/tools/tools/wallabag.nix +++ b/virtual/modules/websites/tools/tools/wallabag.nix @@ -1,12 +1,8 @@ -{ stdenv, fetchurl, writeText, checkEnv, phpPackages, php, which }: +{ stdenv, fetchurl, writeText, env, phpPackages, php, which }: let wallabag = rec { varDir = "/var/lib/wallabag"; - parameters = - assert checkEnv "NIXOPS_WALLABAG_SQL_PASSWORD"; - assert checkEnv "NIXOPS_WALLABAG_SECRET"; - assert checkEnv "NIXOPS_WALLABAG_LDAP_PASSWORD"; - writeText "parameters.yml" '' + parameters = writeText "parameters.yml" '' # This file is auto-generated during the composer install parameters: database_driver: pdo_pgsql @@ -15,7 +11,7 @@ let database_port: null database_name: webapps database_user: wallabag - database_password: ${builtins.getEnv "NIXOPS_WALLABAG_SQL_PASSWORD"} + database_password: ${env.postgresql.password} database_path: null database_table_prefix: wallabag_ database_socket: null @@ -26,7 +22,7 @@ let mailer_user: null mailer_password: null locale: fr - secret: ${builtins.getEnv "NIXOPS_WALLABAG_SECRET"} + secret: ${env.secret} twofactor_auth: true twofactor_sender: wallabag@immae.eu fosuser_registration: false @@ -52,7 +48,7 @@ let ldap_bind_requires_dn: true ldap_base: 'dc=immae,dc=eu' ldap_manager_dn: 'cn=wallabag,ou=services,dc=immae,dc=eu' - ldap_manager_pw: ${builtins.getEnv "NIXOPS_WALLABAG_LDAP_PASSWORD"} + 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_username_attribute: uid