aboutsummaryrefslogtreecommitdiff
path: root/modules/private/websites/chloe
diff options
context:
space:
mode:
authorIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-22 20:07:14 +0200
committerIsmaël Bouya <ismael.bouya@normalesup.org>2021-10-23 01:43:33 +0200
commit750fe5a43b957b91a26069cf8a4fe19fc7b2633c (patch)
tree79b4fb8d49ad7a38884e8453349635a7f715ad7e /modules/private/websites/chloe
parentfcbdf67afe262bf6b35a4047956b2f8c12a04cb1 (diff)
downloadNix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.tar.gz
Nix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.tar.zst
Nix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.zip
Remove webappdirs
Diffstat (limited to 'modules/private/websites/chloe')
-rw-r--r--modules/private/websites/chloe/integration.nix10
-rw-r--r--modules/private/websites/chloe/production.nix10
2 files changed, 8 insertions, 12 deletions
diff --git a/modules/private/websites/chloe/integration.nix b/modules/private/websites/chloe/integration.nix
index c4b79f8..7ed3852 100644
--- a/modules/private/websites/chloe/integration.nix
+++ b/modules/private/websites/chloe/integration.nix
@@ -9,7 +9,6 @@ let
9 varDir = "/var/lib/chloe_integration"; 9 varDir = "/var/lib/chloe_integration";
10 }; 10 };
11 cfg = config.myServices.websites.chloe.integration; 11 cfg = config.myServices.websites.chloe.integration;
12 webappdir = config.services.websites.webappDirsPaths.chloe_integration;
13in { 12in {
14 options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration"; 13 options.myServices.websites.chloe.integration.enable = lib.mkEnableOption "enable Chloe's website in integration";
15 14
@@ -61,13 +60,12 @@ in {
61 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions 60 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions
62 ''; 61 '';
63 }; 62 };
64 services.websites.webappDirs.chloe_integration = app.webRoot;
65 services.websites.env.integration.modules = [ "proxy_fcgi" ]; 63 services.websites.env.integration.modules = [ "proxy_fcgi" ];
66 services.websites.env.integration.vhostConfs.chloe_integration = { 64 services.websites.env.integration.vhostConfs.chloe_integration = {
67 certName = "integration"; 65 certName = "integration";
68 addToCerts = true; 66 addToCerts = true;
69 hosts = ["chloe.immae.eu" ]; 67 hosts = ["chloe.immae.eu" ];
70 root = webappdir; 68 root = app.webRoot;
71 extraConfig = [ 69 extraConfig = [
72 '' 70 ''
73 Include ${config.secrets.fullPaths."websites/chloe/integration"} 71 Include ${config.secrets.fullPaths."websites/chloe/integration"}
@@ -78,16 +76,16 @@ in {
78 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_integration.socket}|fcgi://localhost" 76 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_integration.socket}|fcgi://localhost"
79 </FilesMatch> 77 </FilesMatch>
80 78
81 <Directory ${webappdir}> 79 <Directory ${app.webRoot}>
82 DirectoryIndex index.php index.htm index.html 80 DirectoryIndex index.php index.htm index.html
83 Options -Indexes +FollowSymLinks +MultiViews +Includes 81 Options -Indexes +FollowSymLinks +MultiViews +Includes
84 Include ${webappdir}/htaccess.txt 82 Include ${app.webRoot}/htaccess.txt
85 83
86 AllowOverride AuthConfig FileInfo Limit 84 AllowOverride AuthConfig FileInfo Limit
87 Require all granted 85 Require all granted
88 </Directory> 86 </Directory>
89 87
90 <DirectoryMatch "${webappdir}/squelettes"> 88 <DirectoryMatch "${app.webRoot}/squelettes">
91 Require all denied 89 Require all denied
92 </DirectoryMatch> 90 </DirectoryMatch>
93 91
diff --git a/modules/private/websites/chloe/production.nix b/modules/private/websites/chloe/production.nix
index 92ae05b..c3a5732 100644
--- a/modules/private/websites/chloe/production.nix
+++ b/modules/private/websites/chloe/production.nix
@@ -9,7 +9,6 @@ let
9 varDir = "/var/lib/chloe_production"; 9 varDir = "/var/lib/chloe_production";
10 }; 10 };
11 cfg = config.myServices.websites.chloe.production; 11 cfg = config.myServices.websites.chloe.production;
12 webappdir = config.services.websites.webappDirsPaths.chloe_production;
13in { 12in {
14 options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production"; 13 options.myServices.websites.chloe.production.enable = lib.mkEnableOption "enable Chloe's website in production";
15 14
@@ -66,13 +65,12 @@ in {
66 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions 65 install -m 0750 -o ${apacheUser} -g ${apacheGroup} -d ${app.varDir}/phpSessions
67 ''; 66 '';
68 }; 67 };
69 services.websites.webappDirs.chloe_production = app.webRoot;
70 services.websites.env.production.modules = [ "proxy_fcgi" ]; 68 services.websites.env.production.modules = [ "proxy_fcgi" ];
71 services.websites.env.production.vhostConfs.chloe = { 69 services.websites.env.production.vhostConfs.chloe = {
72 certName = "chloe"; 70 certName = "chloe";
73 certMainHost = "osteopathe-cc.fr"; 71 certMainHost = "osteopathe-cc.fr";
74 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ]; 72 hosts = ["osteopathe-cc.fr" "www.osteopathe-cc.fr" ];
75 root = webappdir; 73 root = app.webRoot;
76 extraConfig = [ 74 extraConfig = [
77 '' 75 ''
78 Use Stats osteopathe-cc.fr 76 Use Stats osteopathe-cc.fr
@@ -90,16 +88,16 @@ in {
90 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_production.socket}|fcgi://localhost" 88 SetHandler "proxy:unix:${config.services.phpfpm.pools.chloe_production.socket}|fcgi://localhost"
91 </FilesMatch> 89 </FilesMatch>
92 90
93 <Directory ${webappdir}> 91 <Directory ${app.webRoot}>
94 DirectoryIndex index.php index.htm index.html 92 DirectoryIndex index.php index.htm index.html
95 Options -Indexes +FollowSymLinks +MultiViews +Includes 93 Options -Indexes +FollowSymLinks +MultiViews +Includes
96 Include ${webappdir}/htaccess.txt 94 Include ${app.webRoot}/htaccess.txt
97 95
98 AllowOverride AuthConfig FileInfo Limit 96 AllowOverride AuthConfig FileInfo Limit
99 Require all granted 97 Require all granted
100 </Directory> 98 </Directory>
101 99
102 <DirectoryMatch "${webappdir}/squelettes"> 100 <DirectoryMatch "${app.webRoot}/squelettes">
103 Require all denied 101 Require all denied
104 </DirectoryMatch> 102 </DirectoryMatch>
105 103