]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - virtual/modules/websites/default.nix
Add etherpad lite tool
[perso/Immae/Config/Nix.git] / virtual / modules / websites / default.nix
index f2f0be11c30e6791ef9cacf8578f76c0936f3c7d..4d5ae23d3564f83403dfca8332c0125917f94ada 100644 (file)
@@ -1,8 +1,5 @@
 { lib, pkgs, config, mylibs, myconfig, ... }:
 let
-  mypkgs = pkgs.callPackage ../../packages.nix {
-    inherit (mylibs) checkEnv fetchedGit fetchedGithub;
-  };
   cfg = config.services.myWebsites;
   makeService = name: cfg: let
     toVhost = vhostConf: {
@@ -102,6 +99,7 @@ in
     ./tools/mastodon
     ./tools/mediagoblin
     ./tools/diaspora
+    ./tools/ether
     # built using:
     # sed -e "s/services\.httpd/services\.httpdProd/g" .nix-defexpr/channels/nixpkgs/nixos/modules/services/web-servers/apache-httpd/default.nix
     # Removed allGranted
@@ -169,6 +167,9 @@ in
         #   '';
       });
       phpPackages = oldpkgs.php72Packages.override { inherit php; };
+      composerEnv = import ./commons/composer-env.nix {
+        inherit (pkgs) stdenv writeTextFile fetchurl php unzip;
+      };
     };
 
     services.myWebsites.tools.databases.enable = true;
@@ -179,6 +180,7 @@ in
     services.myWebsites.tools.mastodon.enable = true;
     services.myWebsites.tools.mediagoblin.enable = true;
     services.myWebsites.tools.diaspora.enable = true;
+    services.myWebsites.tools.etherpad-lite.enable = true;
 
     services.myWebsites.Chloe.production.enable = cfg.production.enable;
     services.myWebsites.Ludivine.production.enable = cfg.production.enable;
@@ -205,7 +207,7 @@ in
       };
       ldap = {
         modules = [ "ldap" "authnz_ldap" ];
-        extraConfig = assert mylibs.checkEnv "NIXOPS_HTTP_LDAP_PASSWORD"; ''
+        extraConfig = ''
           <IfModule ldap_module>
             LDAPSharedCacheSize 500000
             LDAPCacheEntries 1024
@@ -218,7 +220,7 @@ in
             <IfModule authnz_ldap_module>
               AuthLDAPURL          ldap://ldap.immae.eu:389/dc=immae,dc=eu STARTTLS
               AuthLDAPBindDN       cn=httpd,ou=services,dc=immae,dc=eu
-              AuthLDAPBindPassword "${builtins.getEnv "NIXOPS_HTTP_LDAP_PASSWORD"}"
+              AuthLDAPBindPassword "${myconfig.env.httpd.ldap.password}"
               AuthType             Basic
               AuthName             "Authentification requise (Acces LDAP)"
               AuthBasicProvider    ldap