]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/immae/production.nix
Add chatons infos
[perso/Immae/Config/Nix.git] / modules / private / websites / immae / production.nix
index 890a5afecaa4526586fad4a6d8c1bc8295c3ab01..95a8a41a8f174b008b531b986ae0483d78f6320b 100644 (file)
@@ -6,11 +6,13 @@ let
   rechercheDir = "/var/lib/buildbot/outputs/immae/recherche";
   recettesDir = "/var/lib/buildbot/outputs/immae/recettes";
   historyDir = "/var/lib/buildbot/outputs/immae/history";
+  docsDir = "/var/lib/buildbot/outputs/immae/docs/";
   env = config.myEnv.websites.immae;
 in {
   options.myServices.websites.immae.production.enable = lib.mkEnableOption "enable Immae's website";
 
   config = lib.mkIf cfg.enable {
+    myServices.chatonsProperties.enable = true;
     services.webstats.sites = [ { name = "www.immae.eu"; } ];
 
     services.websites.env.production.vhostConfs.immae_production = {
@@ -43,6 +45,14 @@ in {
           Require all granted
         </Directory>
 
+        Alias /.well-known/matrix ${./matrix}
+        <Directory ${./matrix}>
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride None
+          Require all granted
+          Header always set Access-Control-Allow-Origin "*"
+        </Directory>
+
         Alias /cours ${coursDir}
         <Directory ${coursDir}>
           DirectoryIndex index.htm index.html
@@ -51,6 +61,23 @@ in {
           Require all granted
         </Directory>
 
+        Alias /docs ${docsDir}
+        <Directory ${docsDir}>
+          DirectoryIndex index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride All
+          Require all granted
+        </Directory>
+
+        Alias /eurl ${./sarl}
+        Alias /eurl ${./sarl}
+        <Directory ${./sarl}>
+          DirectoryIndex index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride None
+          Require all granted
+        </Directory>
+
         Alias /recherche ${rechercheDir}
         <Directory ${rechercheDir}>
           DirectoryIndex index.htm index.html
@@ -91,9 +118,14 @@ in {
       certName    = "immae";
       addToCerts  = true;
       hosts       = [ "bouya.org" "www.bouya.org" ];
-      root        = null;
+      root        = rechercheDir;
       extraConfig = [ ''
-        RedirectMatch 301 ^/((?!\.well-known.*$).*)$ https://www.normalesup.org/~bouya/
+        <Directory ${rechercheDir}>
+          DirectoryIndex index.htm index.html
+          Options Indexes FollowSymLinks MultiViews Includes
+          AllowOverride All
+          Require all granted
+        </Directory>
         '' ];
     };
   };