]> git.immae.eu Git - perso/Immae/Config/Nix.git/blobdiff - modules/private/websites/chloe/production.nix
Remove webappdirs
[perso/Immae/Config/Nix.git] / modules / private / websites / chloe / production.nix
index 92ae05be304f972ec1c932315c7e6581417d3ae7..c3a5732cd8d9f45013c1aa397614ba609d9423c9 100644 (file)
@@ -9,7 +9,6 @@ let
     varDir = "/var/lib/chloe_production";
   };
   cfg = config.myServices.websites.chloe.production;
-  webappdir = config.services.websites.webappDirsPaths.chloe_production;
 in {
   options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production";
 
@@ -66,13 +65,12 @@ in {
         install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions
       '';
     };
-    services.websites.webappDirs.chloe_production = app.webRoot;
     services.websites.env.production.modules = [ "proxy_fcgi" ];
     services.websites.env.production.vhostConfs.chloe = {
       certName     = "chloe";
       certMainHost = "osteopathe-cc.fr";
       hosts        = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
-      root         = webappdir;
+      root         = app.webRoot;
       extraConfig  = [
         ''
           Use Stats osteopathe-cc.fr
@@ -90,16 +88,16 @@ in {
             SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_production.socket}|fcgi://localhost"
           </FilesMatch>
 
-          <Directory ${webappdir}>
+          <Directory ${app.webRoot}>
             DirectoryIndex index.php index.htm index.html
             Options -Indexes +FollowSymLinks +MultiViews +Includes
-            Include ${webappdir}/htaccess.txt
+            Include ${app.webRoot}/htaccess.txt
 
             AllowOverride AuthConfig FileInfo Limit
             Require all granted
           </Directory>
 
-          <DirectoryMatch "${webappdir}/squelettes">
+          <DirectoryMatch "${app.webRoot}/squelettes">
             Require all denied
           </DirectoryMatch>