diff options
Diffstat (limited to 'modules/private/websites/tools/mail/mta-sts.nix')
-rw-r--r-- | modules/private/websites/tools/mail/mta-sts.nix | 8 |
1 files changed, 2 insertions, 6 deletions
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> |