From 9c492e34bb9dae0e41054f0c43d802c47806bacb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Llu=C3=ADs=20Batlle=20i=20Rossell?= Date: Sat, 9 Apr 2011 16:05:36 +0000 Subject: [PATCH] Making the trac module ldap-aware (for the authentication) and sqlite aware. svn path=/nixos/trunk/; revision=26768 --- .../web-servers/apache-httpd/trac.nix | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/modules/services/web-servers/apache-httpd/trac.nix b/modules/services/web-servers/apache-httpd/trac.nix index f8eb62ddfa1c..5f9a550c9bde 100644 --- a/modules/services/web-servers/apache-httpd/trac.nix +++ b/modules/services/web-servers/apache-httpd/trac.nix @@ -47,6 +47,23 @@ in default = "wwwrun"; description = "Group under which Trac runs."; }; + + ldapAuthentication = { + enable = mkOption { + default = false; + description = "Enable the ldap authentication in trac"; + }; + + url = mkOption { + default = "ldap://127.0.0.1/dc=example,dc=co,dc=ke?uid?sub?(objectClass=inetOrgPerson)"; + description = "URL of the LDAP authentication"; + }; + + name = mkOption { + default = "Trac server"; + description = "AuthName"; + }; + }; }; @@ -61,6 +78,16 @@ in PythonOption TracUriRoot ${config.projectsLocation} PythonOption PYTHON_EGG_CACHE /var/trac/egg-cache + ${if config.ldapAuthentication.enable then '' + + AuthType Basic + AuthName "${config.ldapAuthentication.name}" + AuthBasicProvider "ldap" + AuthLDAPURL "${config.ldapAuthentication.url}" + authzldapauthoritative Off + require valid-user + '' else ""} + ''; globalEnvVars = singleton @@ -72,6 +99,7 @@ in pkgs.setuptools pkgs.pythonPackages.genshi pkgs.pythonPackages.psycopg2 + pkgs.python.modules.sqlite3 subversion ]; };