X-Git-Url: https://git.immae.eu/?a=blobdiff_plain;f=modules%2Fprivate%2Fwebsites%2Ftools%2Fether%2Fdefault.nix;h=da88ec54bb5c88e69818ceeda28d4237f7fedf1f;hb=78228078d95dc4b062f040a0a604c2af66b421e0;hp=600254b74865ba8021f0854977ca859cf695ee41;hpb=6a8252b11bb02f3e67857d5a9d733b1affa6a625;p=perso%2FImmae%2FConfig%2FNix.git diff --git a/modules/private/websites/tools/ether/default.nix b/modules/private/websites/tools/ether/default.nix index 600254b..da88ec5 100644 --- a/modules/private/websites/tools/ether/default.nix +++ b/modules/private/websites/tools/ether/default.nix @@ -1,6 +1,6 @@ -{ lib, pkgs, config, myconfig, ... }: +{ lib, pkgs, config, ... }: let - env = myconfig.env.tools.etherpad-lite; + env = config.myEnv.tools.etherpad-lite; cfg = config.myServices.websites.tools.etherpad-lite; # Make sure we’re not rebuilding whole libreoffice just because of a # dependency @@ -12,7 +12,7 @@ in { }; config = lib.mkIf cfg.enable { - services.backup.profiles.etherpad-lite = { + services.duplyBackup.profiles.etherpad-lite = { rootDir = "/var/lib/private/etherpad-lite"; }; secrets.keys = [ @@ -58,7 +58,7 @@ in { "rtl": false, "alwaysShowChat": false, "chatAndUsers": false, - "lang": "en-gb" + "lang": "fr" }, "suppressErrorsInPadText" : false, @@ -69,7 +69,7 @@ in { "maxAge" : 21600, "abiword" : null, "soffice" : "${libreoffice}/bin/soffice", - "tidyHtml" : "${pkgs.html-tidy}/bin/tidy", + "tidyHtml" : "", "allowUnknownFileEnds" : true, "requireAuthentication" : false, "requireAuthorization" : false, @@ -89,15 +89,15 @@ in { "ldapauth": { "url": "ldaps://${env.ldap.host}", "accountBase": "${env.ldap.base}", - "accountPattern": "(&(memberOf=cn=users,cn=etherpad,ou=services,dc=immae,dc=eu)(uid={{username}}))", + "accountPattern": "${env.ldap.filter}", "displayNameAttribute": "cn", - "searchDN": "cn=etherpad,ou=services,dc=immae,dc=eu", + "searchDN": "${env.ldap.dn}", "searchPWD": "${env.ldap.password}", "groupSearchBase": "${env.ldap.base}", "groupAttribute": "member", "groupAttributeIsDN": true, "searchScope": "sub", - "groupSearch": "(memberOf=cn=groups,cn=etherpad,ou=services,dc=immae,dc=eu)", + "groupSearch": "${env.ldap.group_filter}", "anonymousReadonly": false } }, @@ -135,6 +135,8 @@ in { }; systemd.services.etherpad-lite.serviceConfig.SupplementaryGroups = "keys"; + # Needed so that they get in the closure + systemd.services.etherpad-lite.path = [ libreoffice pkgs.html-tidy ]; services.filesWatcher.etherpad-lite = { restart = true; @@ -155,7 +157,7 @@ in { RewriteEngine On - RewriteMap redirects "txt:${pkgs.writeText "redirects.txt" myconfig.env.tools.etherpad-lite.redirects}" + RewriteMap redirects "txt:${pkgs.writeText "redirects.txt" config.myEnv.tools.etherpad-lite.redirects}" RewriteCond %{QUERY_STRING} "!noredirect" RewriteCond %{REQUEST_URI} "^(.*)$" RewriteCond ''${redirects:$1|Unknown} "!Unknown"