diff options
author | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-22 20:07:14 +0200 |
---|---|---|
committer | Ismaël Bouya <ismael.bouya@normalesup.org> | 2021-10-23 01:43:33 +0200 |
commit | 750fe5a43b957b91a26069cf8a4fe19fc7b2633c (patch) | |
tree | 79b4fb8d49ad7a38884e8453349635a7f715ad7e /modules/private/websites/tools/mail | |
parent | fcbdf67afe262bf6b35a4047956b2f8c12a04cb1 (diff) | |
download | Nix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.tar.gz Nix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.tar.zst Nix-750fe5a43b957b91a26069cf8a4fe19fc7b2633c.zip |
Remove webappdirs
Diffstat (limited to 'modules/private/websites/tools/mail')
4 files changed, 6 insertions, 19 deletions
diff --git a/modules/private/websites/tools/mail/default.nix b/modules/private/websites/tools/mail/default.nix index 033a587..7bc3d2d 100644 --- a/modules/private/websites/tools/mail/default.nix +++ b/modules/private/websites/tools/mail/default.nix | |||
@@ -36,12 +36,12 @@ in | |||
36 | certName = "mail"; | 36 | certName = "mail"; |
37 | addToCerts = true; | 37 | addToCerts = true; |
38 | hosts = ["mail.immae.eu"]; | 38 | hosts = ["mail.immae.eu"]; |
39 | root = "/run/current-system/webapps/_mail"; | 39 | root = ./www; |
40 | extraConfig = [ | 40 | extraConfig = [ |
41 | (rainloop.apache.vhostConf pcfg.rainloop.socket) | 41 | (rainloop.apache.vhostConf pcfg.rainloop.socket) |
42 | (roundcubemail.apache.vhostConf pcfg.roundcubemail.socket) | 42 | (roundcubemail.apache.vhostConf pcfg.roundcubemail.socket) |
43 | '' | 43 | '' |
44 | <Directory /run/current-system/webapps/_mail> | 44 | <Directory ${./www}> |
45 | Require all granted | 45 | Require all granted |
46 | Options -Indexes | 46 | Options -Indexes |
47 | </Directory> | 47 | </Directory> |
@@ -78,13 +78,6 @@ in | |||
78 | roundcubemail = roundcubemail.activationScript; | 78 | roundcubemail = roundcubemail.activationScript; |
79 | rainloop = rainloop.activationScript; | 79 | rainloop = rainloop.activationScript; |
80 | }; | 80 | }; |
81 | |||
82 | services.websites.webappDirs = { | ||
83 | _mail = ./www; | ||
84 | "${roundcubemail.apache.webappName}" = roundcubemail.webRoot; | ||
85 | "${rainloop.apache.webappName}" = rainloop.webRoot; | ||
86 | }; | ||
87 | |||
88 | }; | 81 | }; |
89 | 82 | ||
90 | } | 83 | } |
diff --git a/modules/private/websites/tools/mail/mta-sts.nix b/modules/private/websites/tools/mail/mta-sts.nix index c5f71f0..77ba2d4 100644 --- a/modules/private/websites/tools/mail/mta-sts.nix +++ b/modules/private/websites/tools/mail/mta-sts.nix | |||
@@ -33,21 +33,17 @@ let | |||
33 | in | 33 | in |
34 | { | 34 | { |
35 | config = lib.mkIf cfg.enable { | 35 | config = lib.mkIf cfg.enable { |
36 | services.websites.webappDirs = { | ||
37 | _mta-sts = root; | ||
38 | }; | ||
39 | |||
40 | services.websites.env.tools.vhostConfs.mta_sts = { | 36 | services.websites.env.tools.vhostConfs.mta_sts = { |
41 | certName = "mail"; | 37 | certName = "mail"; |
42 | addToCerts = true; | 38 | addToCerts = true; |
43 | hosts = ["mta-sts.mail.immae.eu"] ++ map (v: "mta-sts.${v.domain}") domains; | 39 | hosts = ["mta-sts.mail.immae.eu"] ++ map (v: "mta-sts.${v.domain}") domains; |
44 | root = "/run/current-system/webapps/_mta-sts"; | 40 | root = root; |
45 | extraConfig = [ | 41 | extraConfig = [ |
46 | '' | 42 | '' |
47 | RewriteEngine on | 43 | RewriteEngine on |
48 | RewriteCond %{HTTP_HOST} ^mta-sts.(.*)$ | 44 | RewriteCond %{HTTP_HOST} ^mta-sts.(.*)$ |
49 | RewriteRule ^/.well-known/mta-sts.txt$ %{DOCUMENT_ROOT}/%1.txt [L] | 45 | RewriteRule ^/.well-known/mta-sts.txt$ %{DOCUMENT_ROOT}/%1.txt [L] |
50 | <Directory /run/current-system/webapps/_mta-sts> | 46 | <Directory ${root}> |
51 | Require all granted | 47 | Require all granted |
52 | Options -Indexes | 48 | Options -Indexes |
53 | </Directory> | 49 | </Directory> |
diff --git a/modules/private/websites/tools/mail/rainloop.nix b/modules/private/websites/tools/mail/rainloop.nix index 21de5eb..20e43a1 100644 --- a/modules/private/websites/tools/mail/rainloop.nix +++ b/modules/private/websites/tools/mail/rainloop.nix | |||
@@ -14,8 +14,7 @@ rec { | |||
14 | user = "wwwrun"; | 14 | user = "wwwrun"; |
15 | group = "wwwrun"; | 15 | group = "wwwrun"; |
16 | modules = [ "proxy_fcgi" ]; | 16 | modules = [ "proxy_fcgi" ]; |
17 | webappName = "tools_rainloop"; | 17 | root = webRoot; |
18 | root = "/run/current-system/webapps/${webappName}"; | ||
19 | vhostConf = socket: '' | 18 | vhostConf = socket: '' |
20 | Alias /rainloop "${root}" | 19 | Alias /rainloop "${root}" |
21 | <Directory "${root}"> | 20 | <Directory "${root}"> |
diff --git a/modules/private/websites/tools/mail/roundcubemail.nix b/modules/private/websites/tools/mail/roundcubemail.nix index 92de28e..2661b55 100644 --- a/modules/private/websites/tools/mail/roundcubemail.nix +++ b/modules/private/websites/tools/mail/roundcubemail.nix | |||
@@ -79,8 +79,7 @@ rec { | |||
79 | user = "wwwrun"; | 79 | user = "wwwrun"; |
80 | group = "wwwrun"; | 80 | group = "wwwrun"; |
81 | modules = [ "proxy_fcgi" ]; | 81 | modules = [ "proxy_fcgi" ]; |
82 | webappName = "tools_roundcubemail"; | 82 | root = webRoot; |
83 | root = "/run/current-system/webapps/${webappName}"; | ||
84 | vhostConf = socket: '' | 83 | vhostConf = socket: '' |
85 | Alias /roundcube "${root}" | 84 | Alias /roundcube "${root}" |
86 | <Directory "${root}"> | 85 | <Directory "${root}"> |