X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fmastodon%2Fdefault.nix;h=80d74318daef949fc1aa3eeeb080fbbdefe8dfc3;hb=ab8f306d7c2c49b8116e1af7b355ed2384617ed9;hp=97f2452579cfd44b6bf98091cf57a7c8964b1ca1;hpb=4227853a03923e04daf3dd511a4b5a1ab5d527e7;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/mastodon/default.nix b/modules/private/websites/tools/mastodon/default.nix index 97f2452..80d7431 100644 --- a/modules/private/websites/tools/mastodon/default.nix +++ b/modules/private/websites/tools/mastodon/default.nix @@ -1,6 +1,6 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let - env = myconfig.env.tools.mastodon; + env = config.myEnv.tools.mastodon; root = "/run/current-system/webapps/tools_mastodon"; cfg = config.myServices.websites.tools.mastodon; mcfg = config.services.mastodon; @@ -50,14 +50,14 @@ in { # LDAP authentication (optional) LDAP_ENABLED=true - LDAP_HOST=ldap.immae.eu + LDAP_HOST=${env.ldap.host} LDAP_PORT=636 LDAP_METHOD=simple_tls - LDAP_BASE="dc=immae,dc=eu" - LDAP_BIND_DN="cn=mastodon,ou=services,dc=immae,dc=eu" + LDAP_BASE="${env.ldap.base}" + LDAP_BIND_DN="${env.ldap.dn}" LDAP_PASSWORD="${env.ldap.password}" LDAP_UID="uid" - LDAP_SEARCH_FILTER="(&(%{uid}=%{email})(memberOf=cn=users,cn=mastodon,ou=services,dc=immae,dc=eu))" + LDAP_SEARCH_FILTER="${env.ldap.filter}" ''; }]; services.mastodon = {