about summary refs log tree commit diff
path: root/mail.nix
diff options
context:
space:
mode:
authorNguyễn Gia Phong <cnx@loang.net>2024-01-12 02:43:49 +0900
committerNguyễn Gia Phong <cnx@loang.net>2024-01-12 02:43:49 +0900
commita24e8ace06b1f2ec2240dccb21140c8742c70675 (patch)
tree461909976c31ba86aaf0a2c6b23dee5500c9af4e /mail.nix
parente804d8ca42c6f31d485689eb3af6ea7fe9c5851d (diff)
downloadnixos-conf-a24e8ace06b1f2ec2240dccb21140c8742c70675.tar.gz
Use more suitable trivial text builders
Diffstat (limited to 'mail.nix')
-rw-r--r--mail.nix16
1 files changed, 6 insertions, 10 deletions
diff --git a/mail.nix b/mail.nix
index 1fd2d01..61b80c1 100644
--- a/mail.nix
+++ b/mail.nix
@@ -76,16 +76,12 @@ in {
       "mta-sts.${domain}" = {
         enableACME = true;
         forceSSL = true;
-        locations."/".root = pkgs.writeTextFile {
-          name = "mta-sts.txt";
-          text = ''
-            version: STSv1
-            mode: enforce
-            max_age: 604800
-            mx: ${hostname}
-          '';
-          destination = "/.well-known/mta-sts.txt";
-        };
+        locations."/".root = pkgs.writeTextDir ".well-known/mta-sts.txt" ''
+          version: STSv1
+          mode: enforce
+          max_age: 604800
+          mx: ${hostname}
+        '';
       };
 
       ${domain}.locations."^~ /.well-known/openpgpkey" = {